<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgit/ui-summary.c, branch lf/filter</title>
<subtitle>A hyperfast web frontend for git repositories written in C.</subtitle>
<id>http://git.cetero.st/cgit/atom/ui-summary.c?h=lf%2Ffilter</id>
<link rel='self' href='http://git.cetero.st/cgit/atom/ui-summary.c?h=lf%2Ffilter'/>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/'/>
<updated>2014-01-14T01:00:07Z</updated>
<entry>
<title>filter: return on null filter from open and close</title>
<updated>2014-01-14T01:00:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-01-13T02:56:50Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=800380dde797ae35d738a644acdae2fabb9a0d44'/>
<id>urn:sha1:800380dde797ae35d738a644acdae2fabb9a0d44</id>
<content type='text'>
So that we don't have to include the if(filter) open_filter(filter)
block everywhere, we introduce the guard in the function itself. This
should simplify quite a bit of code.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>filter: pass extra arguments via cgit_open_filter</title>
<updated>2014-01-12T19:20:20Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2014-01-12T17:13:50Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=3d8a6507ca542881a5e8b30ad6b7068a9c4fdeea'/>
<id>urn:sha1:3d8a6507ca542881a5e8b30ad6b7068a9c4fdeea</id>
<content type='text'>
This avoids poking into the filter data structure at various points in
the code.  We rely on the fact that the number of arguments is fixed
based on the filter type (set in cgit_new_filter) and that the call
sites all know which filter type they're using.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>Replace most uses of strncmp() with prefixcmp()</title>
<updated>2014-01-10T16:01:29Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2014-01-10T11:44:35Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=36bdb2171f7154fcdf1a24d38c8ce3bd7e448cb1'/>
<id>urn:sha1:36bdb2171f7154fcdf1a24d38c8ce3bd7e448cb1</id>
<content type='text'>
This is a preparation for replacing all prefix checks with either
strip_prefix() or starts_with() when Git 1.8.6 is released.

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>Update copyright information</title>
<updated>2014-01-08T14:10:49Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@crytocrack.de</email>
</author>
<published>2014-01-08T14:10:49Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=f7f26f88755ac6a3b9af4918b51b0d6e7a692c78'/>
<id>urn:sha1:f7f26f88755ac6a3b9af4918b51b0d6e7a692c78</id>
<content type='text'>
* Name "cgit Development Team" as copyright holder to avoid listing
  every single developer.

* Update copyright ranges.

Signed-off-by: Lukas Fleischer &lt;cgit@crytocrack.de&gt;
</content>
</entry>
<entry>
<title>ui-summary: do not free ref</title>
<updated>2013-05-28T07:31:45Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2013-05-28T07:31:45Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=7fb12a8ee0789e3eab2680ae6c3fde0f0f233d22'/>
<id>urn:sha1:7fb12a8ee0789e3eab2680ae6c3fde0f0f233d22</id>
<content type='text'>
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>readme: use string_list instead of space deliminations</title>
<updated>2013-05-26T14:30:03Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2013-05-26T13:20:02Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=dcbc0438b2543a733858d62170f3110a89edbed6'/>
<id>urn:sha1:dcbc0438b2543a733858d62170f3110a89edbed6</id>
<content type='text'>
Now this is possible in cgitrc -

readme=:README.md
readme=:readme.md
readme=:README.mkd
readme=:readme.mkd
readme=:README.rst
readme=:readme.rst
readme=:README.html
readme=:readme.html
readme=:README.htm
readme=:readme.htm
readme=:README.txt
readme=:readme.txt
readme=:README
readme=:readme
readme=:INSTALL.txt
readme=:install.txt
readme=:INSTALL
readme=:install

Suggested-by: John Keeping &lt;john@keeping.me.uk&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>ui-summary: Disallow directory traversal</title>
<updated>2013-05-25T18:33:28Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2013-05-25T17:47:15Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=fe36f84d843cd755c6dab629a0758264de5bcc00'/>
<id>urn:sha1:fe36f84d843cd755c6dab629a0758264de5bcc00</id>
<content type='text'>
Using the url= query string, it was possible request arbitrary files
from the filesystem if the readme for a given page was set to a
filesystem file. The following request would return my /etc/passwd file:

http://git.zx2c4.com/?url=/somerepo/about/../../../../etc/passwd
http://data.zx2c4.com/cgit-directory-traversal.png

This fix uses realpath(3) to canonicalize all paths, and then compares
the base components.

This fix introduces a subtle timing attack, whereby a client can check
whether or not strstr is called using timing measurements in order
to determine if a given file exists on the filesystem.

This fix also does not account for filesystem race conditions (TOCTOU)
in resolving symlinks.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>readme: Accept multiple candidates and test them.</title>
<updated>2013-05-25T18:33:28Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2013-05-25T14:32:37Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=cd4c77d989983778432363061e99219f034c3717'/>
<id>urn:sha1:cd4c77d989983778432363061e99219f034c3717</id>
<content type='text'>
The readme variable may now contain multiple space deliminated entries,
which per usual are either a filepath or a git ref filepath. If multiple
are specified, cgit will now select the first one in the list that
exists. This is to make it easier to specify multiple default readme
types in the main cgitrc file and have them automatically get applied to
each repo based on what exists.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>ui-summary: Pass filename to about-filter</title>
<updated>2013-05-25T18:33:28Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2013-05-25T12:50:19Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=c0dfaf1c281d0697ce43131343d7a9f170a61ff9'/>
<id>urn:sha1:c0dfaf1c281d0697ce43131343d7a9f170a61ff9</id>
<content type='text'>
This gives the about-filter API the same semantics as source-filter,
where the filter receives the filename so it can decide what to do next
with it.

While we're at it, plug a memory leak.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>ui-summary: Use default branch for readme if : prefix</title>
<updated>2013-05-25T18:33:28Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2013-05-25T12:19:10Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=3cb5d86dc68bab4883bf5a7cbc90f3e266237355'/>
<id>urn:sha1:3cb5d86dc68bab4883bf5a7cbc90f3e266237355</id>
<content type='text'>
If the readme value begins with ":", and has no specified branch before
it, use the repository's default branch.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
</feed>
