<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgit/ui-diff.c, branch v0.9.0.3</title>
<subtitle>A hyperfast web frontend for git repositories written in C.</subtitle>
<id>http://git.cetero.st/cgit/atom/ui-diff.c?h=v0.9.0.3</id>
<link rel='self' href='http://git.cetero.st/cgit/atom/ui-diff.c?h=v0.9.0.3'/>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/'/>
<updated>2012-01-03T16:02:14Z</updated>
<entry>
<title>Fix diff mode switching when side-by-side-diffs=1</title>
<updated>2012-01-03T16:02:14Z</updated>
<author>
<name>Tim Chen</name>
<email>timchen1@gmail.com</email>
</author>
<published>2012-01-03T16:02:14Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=f2ced535e9f2c2ada7f184735a07a1190a9d810f'/>
<id>urn:sha1:f2ced535e9f2c2ada7f184735a07a1190a9d810f</id>
<content type='text'>
When side-by-side-diffs=1 was set in cgitrc, specyfing 'ss=0' in the query-
string would not switch to unified diffs. This patch fixes the issue by
introducing a separate variable to track the occurrence of "ss" in the
querystring.
</content>
</entry>
<entry>
<title>Fix potential XSS vulnerability in rename hint</title>
<updated>2011-07-22T12:21:28Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2011-07-22T11:47:19Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=bebe89d7c11a92bf206bf6e528c51ffa8ecbc0d5'/>
<id>urn:sha1:bebe89d7c11a92bf206bf6e528c51ffa8ecbc0d5</id>
<content type='text'>
The file name displayed in the rename hint should be escaped to avoid
XSS. Note that this vulnerability is only applicable when an attacker
has gained push access to the repository.

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
Signed-off-by: Lars Hjemli &lt;hjemli@gmail.com&gt;
</content>
</entry>
<entry>
<title>Avoid null pointer dereference in cgit_print_diff().</title>
<updated>2011-05-23T20:58:35Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2011-04-05T08:38:53Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=9afc883297b0d0943e9b358d2299950f33e8e5ed'/>
<id>urn:sha1:9afc883297b0d0943e9b358d2299950f33e8e5ed</id>
<content type='text'>
When calling cgit_print_diff() with a bad new_rev and a NULL old_rev,
checking for new_rev's parent commit will result in a null pointer
dereference. Returning on an invalid commit before dereferencing fixes
this. Spotted with clang-analyzer.

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
Signed-off-by: Lars Hjemli &lt;hjemli@gmail.com&gt;
</content>
</entry>
<entry>
<title>ui-diff.c: avoid html injection</title>
<updated>2011-03-05T13:13:06Z</updated>
<author>
<name>Lukasz Janyst</name>
<email>ljanyst@cern.ch</email>
</author>
<published>2011-03-05T13:10:55Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=7f3c6e0ce9b41142cf2707af100992acdce059df'/>
<id>urn:sha1:7f3c6e0ce9b41142cf2707af100992acdce059df</id>
<content type='text'>
When path-filtering was used in commit-view, the path filter was
included without proper html escaping. This patch closes the hole.

Signed-off-by: Lukasz Janyst &lt;ljanyst@cern.ch&gt;
Signed-off-by: Lars Hjemli &lt;hjemli@gmail.com&gt;
</content>
</entry>
<entry>
<title>ssdiff: anchors for ssdiff</title>
<updated>2011-02-19T13:41:39Z</updated>
<author>
<name>Bernhard Reutner-Fischer</name>
<email>rep.dot.nop@gmail.com</email>
</author>
<published>2010-12-23T11:47:55Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=e52040bf90b034aebbfa32756638a24d6b1b3712'/>
<id>urn:sha1:e52040bf90b034aebbfa32756638a24d6b1b3712</id>
<content type='text'>
Emit anchors to the respective revisions in side-by-side diff view

Signed-off-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
Signed-off-by: Lars Hjemli &lt;hjemli@gmail.com&gt;
</content>
</entry>
<entry>
<title>fix errors in printf-style format strings</title>
<updated>2010-09-04T15:35:38Z</updated>
<author>
<name>Mark Lodato</name>
<email>lodatom@gmail.com</email>
</author>
<published>2010-09-04T15:30:18Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=e4ddc8f72b5a7d8c55a6c2042c7b7f945ba4b1a2'/>
<id>urn:sha1:e4ddc8f72b5a7d8c55a6c2042c7b7f945ba4b1a2</id>
<content type='text'>
There were many places where the arguments to a printf-like function did
not match the format string.  Mostly, these were a missing 'l' flag, but
there were three exceptions:

- In ui-stats.c, a size_t argument must be printed.  C99 has the "%zu"
  flag for this purpose, but not all compilers support this.  Therefore,
  we mimic what git does - use a NO_C99_FORMAT Makefile variable.

- In ui-stats.c, cgit_print_error() was called with a pointer instead of
  a character.

- In ui-log.c, the "columns" argument was never used.

Signed-off-by: Mark Lodato &lt;lodatom@gmail.com&gt;
</content>
</entry>
<entry>
<title>ui-diff: Add link to ignore/show whitespace changes in diffs</title>
<updated>2010-07-18T08:54:02Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2010-06-24T15:53:20Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=72ef913514288bd2aae23509581097bfd3edf8c4'/>
<id>urn:sha1:72ef913514288bd2aae23509581097bfd3edf8c4</id>
<content type='text'>
Add a link to the "Diffstat" line to ignore/show whitespace changes in the
generated diff.

To support this, cgit_commit_link() and cgit_diff_link() has learned to
preserve the ctx.qry.ignorews variable.

Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
</content>
</entry>
<entry>
<title>Add URL parameter 'ignorews' for optionally ignoring whitespace in diffs</title>
<updated>2010-07-18T08:53:48Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2010-06-24T15:52:57Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=2cc8b99f083014c58d8937bfa4dcd2bc47cd7e58'/>
<id>urn:sha1:2cc8b99f083014c58d8937bfa4dcd2bc47cd7e58</id>
<content type='text'>
The new ctx.qry.ignorews variable is passed via cgit_diff_files() and
cgit_diff_tree() to Git's diff machinery. This is equivalent to passing
--ignore-all-space to 'git diff'.

Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
</content>
</entry>
<entry>
<title>ui-diff: Add links to increase/decrease number of context lines in diffs</title>
<updated>2010-06-19T11:00:07Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2010-06-10T18:15:51Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=d20313e3daf855ee5d4808e050f54614c200d7b1'/>
<id>urn:sha1:d20313e3daf855ee5d4808e050f54614c200d7b1</id>
<content type='text'>
Add two links to the "Diffstat" line to show more/less context lines in the
generated diff.

To support this, cgit_commit_link() and cgit_diff_link() has learned to
preserve the ctx.qry.context variable.

Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Lars Hjemli &lt;hjemli@gmail.com&gt;
</content>
</entry>
<entry>
<title>Add URL parameter 'context' for changing the number of context lines in diffs</title>
<updated>2010-06-19T11:00:07Z</updated>
<author>
<name>Johan Herland</name>
<email>johan@herland.net</email>
</author>
<published>2010-06-10T18:15:27Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=6180e6169d6e87a3bea7e4da835dca17f93e5cfd'/>
<id>urn:sha1:6180e6169d6e87a3bea7e4da835dca17f93e5cfd</id>
<content type='text'>
The new ctx.qry.context variable is picked up by cgit_print_diff(), and
passed via cgit_diff_files() to Git's diff machinery.

Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Lars Hjemli &lt;hjemli@gmail.com&gt;
</content>
</entry>
</feed>
