<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgit/ui-summary.c, branch v0.9.2</title>
<subtitle>A hyperfast web frontend for git repositories written in C.</subtitle>
<id>http://git.cetero.st/cgit/atom/ui-summary.c?h=v0.9.2</id>
<link rel='self' href='http://git.cetero.st/cgit/atom/ui-summary.c?h=v0.9.2'/>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/'/>
<updated>2013-05-26T14:30:03Z</updated>
<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>
<entry>
<title>use struct strbuf instead of static buffers</title>
<updated>2013-04-08T14:12:52Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2013-04-06T09:28:57Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=fb3655df3bf85bd405c5921bbd4b3a54c705c839'/>
<id>urn:sha1:fb3655df3bf85bd405c5921bbd4b3a54c705c839</id>
<content type='text'>
Use "struct strbuf" from Git to remove the limit on file path length.

Notes on scan-tree:
This is slightly involved since I decided to pass the strbuf into
add_repo() and modify if whenever a new file name is required, which
should avoid any extra allocations within that function.  The pattern
there is to append the filename, use it and then reset the buffer to its
original length (retaining a trailing '/').

Notes on ui-snapshot:
Since write_archive modifies the argv array passed to it we
copy the argv_array values into a new array of char* and then free the
original argv_array structure and the new array without worrying about
what the values now look like.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>Always #include corresponding .h in .c files</title>
<updated>2013-04-08T13:45:34Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2013-04-06T10:37:59Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=8f208794318f83826e98168b8b430f2d9a68bcce'/>
<id>urn:sha1:8f208794318f83826e98168b8b430f2d9a68bcce</id>
<content type='text'>
While doing this, remove declarations from header files where the
corresponding definition is declared "static" in order to avoid build
errors.

Also re-order existing headers in ui-*.c so that the file-specific
header always comes immediately after "cgit.h", helping with future
consistency.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>ui-summary.c: Move urls variable into print_urls()</title>
<updated>2013-03-20T20:08:32Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2013-03-05T15:48:27Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=977a3ad7bf212e6ec7f43c16763321061ee64a69'/>
<id>urn:sha1:977a3ad7bf212e6ec7f43c16763321061ee64a69</id>
<content type='text'>
There's no need for this variable to be global. Printing the header in
print_urls() instead of print_url() allows for moving this variable into
print_urls() without having to pass any status to print_url().

Note that this only works as long as we don't call print_urls() more
than once.

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>Fix colspan values</title>
<updated>2013-03-20T20:08:32Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2013-03-05T14:42:14Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=ef8a97d9c6983e4fc3710bdbe771edd4e3550dba'/>
<id>urn:sha1:ef8a97d9c6983e4fc3710bdbe771edd4e3550dba</id>
<content type='text'>
This fixes a couple of minor oversights in previous commits and adjusts
all cells using colspan to use the correct width.

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>ui-log: Add "commit-sort" option for controlling commit ordering</title>
<updated>2012-10-17T14:30:29Z</updated>
<author>
<name>Tobias Bieniek</name>
<email>Tobias.Bieniek@gmx.de</email>
</author>
<published>2012-10-13T14:10:30Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=792f813d342013124ce40142fef4afee3ff00df3'/>
<id>urn:sha1:792f813d342013124ce40142fef4afee3ff00df3</id>
<content type='text'>
This makes it possible to use strict commit date ordering or strict
topological ordering by passing the corresponding flags to "git log".

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