<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/tests/resources/config, branch ethomson/diff_enum</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/'/>
<entry>
<title>Add test config parsing</title>
<updated>2021-09-09T19:51:52+00:00</updated>
<author>
<name>Basile Henry</name>
<email>bjm.henry@gmail.com</email>
</author>
<published>2021-09-09T19:51:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=5eab4dafbe441ef22f06bb1eae6f544a862b822b'/>
<id>5eab4dafbe441ef22f06bb1eae6f544a862b822b</id>
<content type='text'>
This tests parsing a multiline string containing multiple quoted comment
chars. See #6019
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This tests parsing a multiline string containing multiple quoted comment
chars. See #6019
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix config file parsing with multi line values containing quoted parts</title>
<updated>2020-09-18T09:21:00+00:00</updated>
<author>
<name>Sven Strickroth</name>
<email>email@cs-ware.de</email>
</author>
<published>2020-09-09T15:51:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=6ac18625869063a591828b33453148bf63e679e8'/>
<id>6ac18625869063a591828b33453148bf63e679e8</id>
<content type='text'>
Signed-off-by: Sven Strickroth &lt;email@cs-ware.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Sven Strickroth &lt;email@cs-ware.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>config_entries: micro-optimize storage of multivars</title>
<updated>2019-11-05T12:24:12+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-09-26T13:06:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=b7dcea0492a424e04d5441a91919701b89b5a572'/>
<id>b7dcea0492a424e04d5441a91919701b89b5a572</id>
<content type='text'>
Multivars are configuration entries that have many values for the same
name; we can thus micro-optimize this case by just retaining the name of
the first configuration entry and freeing all the others, letting them
point to the string of the first entry.

The attached test case is an extreme example that demonstrates this. It
contains a section name that is approximately 500kB in size with 20.000
entries "a=b". Without the optimization, this would require at least
20000*500kB bytes, which is around 10GB. With this patch, it only
requires 500kB+20000*1B=20500kB.

The obvious culprit here is the section header, which we repeatedly
include in each of the configuration entry's names. This makes it very
easier for an adversary to provide a small configuration file that
disproportionally blows up in memory during processing and is thus a
feasible way for a denial-of-service attack. Unfortunately, we cannot
fix the root cause by e.g. having a separate "section" field that may
easily be deduplicated due to the `git_config_entry` structure being
part of our public API. So this micro-optimization is the best we can do
for now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Multivars are configuration entries that have many values for the same
name; we can thus micro-optimize this case by just retaining the name of
the first configuration entry and freeing all the others, letting them
point to the string of the first entry.

The attached test case is an extreme example that demonstrates this. It
contains a section name that is approximately 500kB in size with 20.000
entries "a=b". Without the optimization, this would require at least
20000*500kB bytes, which is around 10GB. With this patch, it only
requires 500kB+20000*1B=20500kB.

The obvious culprit here is the section header, which we repeatedly
include in each of the configuration entry's names. This makes it very
easier for an adversary to provide a small configuration file that
disproportionally blows up in memory during processing and is thus a
feasible way for a denial-of-service attack. Unfortunately, we cannot
fix the root cause by e.g. having a separate "section" field that may
easily be deduplicated due to the `git_config_entry` structure being
part of our public API. So this micro-optimization is the best we can do
for now.
</pre>
</div>
</content>
</entry>
<entry>
<title>Write a test.</title>
<updated>2018-08-14T03:54:01+00:00</updated>
<author>
<name>Nelson Elhage</name>
<email>nelhage@nelhage.com</email>
</author>
<published>2018-08-14T03:54:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=f140950066cf2989912e18ad92ec088f624b8bf2'/>
<id>f140950066cf2989912e18ad92ec088f624b8bf2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>config: Add test cases that have trailing spaces before comment chars</title>
<updated>2014-10-04T15:28:40+00:00</updated>
<author>
<name>Linquize</name>
<email>linquize@yahoo.com.hk</email>
</author>
<published>2014-10-04T15:28:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=a447a7e40b03d1c8ecb49ab0ef015eb4c0fd2b6e'/>
<id>a447a7e40b03d1c8ecb49ab0ef015eb4c0fd2b6e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename tests-clar to tests</title>
<updated>2013-11-14T22:05:52+00:00</updated>
<author>
<name>Ben Straub</name>
<email>bs@github.com</email>
</author>
<published>2013-11-14T22:05:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=1782038144ef3413831801bb9c2f3038a84ac6f4'/>
<id>1782038144ef3413831801bb9c2f3038a84ac6f4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Moved testing resources to clar, and removed old tests directory.</title>
<updated>2012-03-31T23:10:01+00:00</updated>
<author>
<name>Ben Straub</name>
<email>ben@straubnet.net</email>
</author>
<published>2012-03-31T23:10:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=fd29cd13b70b9a3a90ca605e2d1a633a08f1daf7'/>
<id>fd29cd13b70b9a3a90ca605e2d1a633a08f1daf7</id>
<content type='text'>
Removed the BUILD_CLAR CMake flag, and updated the readme.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removed the BUILD_CLAR CMake flag, and updated the readme.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement setting multivars</title>
<updated>2012-02-17T18:50:30+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>carlos@cmartin.tk</email>
</author>
<published>2012-02-04T23:29:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=3005855f7e3980185adc63a68c5b8b5f9e3b506f'/>
<id>3005855f7e3980185adc63a68c5b8b5f9e3b506f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: add multivar read test</title>
<updated>2012-02-17T18:43:43+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>carlos@cmartin.tk</email>
</author>
<published>2012-02-01T16:47:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=78d65f390f031d18ce698a24e1f83b99cc8cf699'/>
<id>78d65f390f031d18ce698a24e1f83b99cc8cf699</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>config: behave like git with [section.subsection]</title>
<updated>2011-10-01T17:58:26+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>carlos@cmartin.tk</email>
</author>
<published>2011-10-01T17:56:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=9ac581bf7fffaf809214fdd950bb62d242ee52fe'/>
<id>9ac581bf7fffaf809214fdd950bb62d242ee52fe</id>
<content type='text'>
The documentation is a bit misleading. The subsection name is always
case-sensitive, but with a [section.subsection] header, the subsection
is transformed to lowercase when the configuration is parsed.

Signed-off-by: Carlos Martín Nieto &lt;carlos@cmartin.tk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The documentation is a bit misleading. The subsection name is always
case-sensitive, but with a [section.subsection] header, the subsection
is transformed to lowercase when the configuration is parsed.

Signed-off-by: Carlos Martín Nieto &lt;carlos@cmartin.tk&gt;
</pre>
</div>
</content>
</entry>
</feed>
