Two way git mirror: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Hendrik Brummermann mNo edit summary |
imported>Hendrik Brummermann fixed regex (thanks to wjp) |
||
| Line 76: | Line 76: | ||
// validate repository name to prevent injection and traversing attacks |
// validate repository name to prevent injection and traversing attacks |
||
$repo = $_REQUEST['repository']; |
$repo = $_REQUEST['repository']; |
||
if (!preg_match('/^[a-zA-Z0-9]$/', $repo)) { |
if (!preg_match('/^[a-zA-Z0-9]+$/', $repo)) { |
||
die('invalid repository name'); |
die('invalid repository name'); |
||
} |
} |
||