Page MenuHomePhabricator

refreshWikiversionsCDB should fail if invalid version is specified in wikiversions.dat
Closed, ResolvedPublic

Description

Currently, it's possible to put this into wikiversions.dat:
enwiki php-1.onemillonandsomething

...even though this file:
/usr/local/apache/common-local/php-1.onemillonandsomething/index.php

...doesn't exist and hopefully never will. That means running refreshWikiversionsCDB will cause a fatal on the enwiki homepage.

Solution: do a sanity check prior to building the cdb file, and make sure that for each specified version "foo", that this file exists:

/usr/local/apache/common-local/foo/index.php

...and exit with a fatal error if it doesn't, leaving the cdb file unscathed.


Version: unspecified
Severity: enhancement

Details

Reference
bz36079

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:22 AM
bzimport set Reference to bz36079.
bzimport added a subscriber: Unknown Object (MLST).

Also could we use trigger_error(..., E_USER_ERROR) instead of die() in multiversion? That way, users would see a nicer-looking error message, and more importantly, the error would be logged.