Indefero

Indefero Commit Details


Date:2008-11-30 04:18:58 (16 years 22 days ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:2732da9dbb8f767cd423be1ef396f2ba20012d1c
Parents: 57a4ea7cb034522a708a338e2d701b5014bf2716
Message:Fixed possible fatal error in the Wiki.

The error could be triggered only when playing with the URL manually.
Changes:

File differences

src/IDF/Middleware.php
4848
4949
5050
51
51
5252
5353
5454
try {
$request->project = IDF_Project::getOr404($match[1]);
} catch (Pluf_HTTP_Error404 $e) {
return new Pluf_HTTP_Response_NotFound(sprintf(__('The page <em>%s</em> was not found on the server.'), htmlspecialchars($request->query)));
return new Pluf_HTTP_Response_NotFound($request);
}
$request->conf = new IDF_Conf();
$request->conf->setProject($request->project);
src/IDF/Views/Wiki.php
216216
217217
218218
219
219
220220
221221
222222
......
225225
226226
227227
228
228
229229
230230
231231
array($prj->id, $match[2]));
$pages = Pluf::factory('IDF_WikiPage')->getList(array('filter'=>$sql->gen()));
if ($pages->count() != 1) {
throw new Pluf_HTTP_Error404($request);
throw new Pluf_HTTP_Response_NotFound($request);
}
$page = $pages[0];
$oldrev = false;
$oldrev = Pluf_Shortcuts_GetObjectOr404('IDF_WikiRevision',
$request->GET['rev']);
if ($oldrev->wikipage != $page->id or $oldrev->is_head == true) {
throw new Pluf_HTTP_Error404($request);
throw new Pluf_HTTP_Response_NotFound($request);
}
}
$ptags = self::getWikiTags($prj);

Archive Download the corresponding diff file

Page rendered in 0.08202s using 13 queries.