Indefero

Indefero Commit Details


Date:2009-02-17 02:37:05 (15 years 10 months 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:64dc8ec3b8510f4408f3fddb7a038cadeae9172f
Parents: d1b139bb30d1c7a42e31be29ca6f0ae6db1f0a94
Message:Fixed to prevent a crash when accessing the base page of a project with no /.

When accessing the base page of a project without a trailing slash, the regex to get the project in the
request object was not matching, resulting in a missing project in the request object.
Changes:

File differences

src/IDF/Middleware.php
4444
4545
4646
47
47
4848
4949
5050
function process_request(&$request)
{
$match = array();
if (preg_match('#^/(?:api/p|p)/([\-\w]+)/#', $request->query, $match)) {
if (preg_match('#^/(?:api/p|p)/([\-\w]+)/?#', $request->query, $match)) {
try {
$request->project = IDF_Project::getOr404($match[1]);
} catch (Pluf_HTTP_Error404 $e) {

Archive Download the corresponding diff file

Page rendered in 0.07685s using 13 queries.