Index: trunk/phase3/includes/filerepo/backend/FileBackendMultiWrite.php |
— | — | @@ -256,7 +256,7 @@ |
257 | 257 | protected function substPaths( $paths, FileBackendStore $backend ) { |
258 | 258 | return preg_replace( |
259 | 259 | '!^mwstore://' . preg_quote( $this->name ) . '/!', |
260 | | - 'mwstore://' . $backend->getName() . '/', |
| 260 | + StringUtils::escapeRegexReplacement( "mwstore://{$backend->getName()}/" ), |
261 | 261 | $paths // string or array |
262 | 262 | ); |
263 | 263 | } |
— | — | @@ -270,7 +270,7 @@ |
271 | 271 | protected function unsubstPaths( $paths ) { |
272 | 272 | return preg_replace( |
273 | 273 | '!^mwstore://([^/]+)!', |
274 | | - "mwstore://{$this->name}", |
| 274 | + StringUtils::escapeRegexReplacement( "mwstore://{$this->name}" ), |
275 | 275 | $paths // string or array |
276 | 276 | ); |
277 | 277 | } |
Index: trunk/phase3/includes/filerepo/backend/FileBackend.php |
— | — | @@ -42,8 +42,9 @@ |
43 | 43 | * |
44 | 44 | * $config includes: |
45 | 45 | * 'name' : The unique name of this backend. |
| 46 | + * This should consist of alphanumberic, '-', and '_' characters. |
46 | 47 | * 'wikiId' : Prefix to container names that is unique to this wiki. |
47 | | - * This should consist of alphanumberic, '-', and '_' chars. |
| 48 | + * This should consist of alphanumberic, '-', and '_' characters. |
48 | 49 | * 'lockManager' : Registered name of a file lock manager to use. |
49 | 50 | * 'readOnly' : Write operations are disallowed if this is a non-empty string. |
50 | 51 | * It should be an explanation for the backend being read-only. |