Merge remote-tracking branch 'gitorious/1.0.x' into 1.0.x

This commit is contained in:
Evan Prodromou 2011-08-08 12:01:48 -04:00
commit 632ed129eb
2 changed files with 8 additions and 8 deletions

View File

@ -111,7 +111,7 @@ class HTMLOutputter extends XMLOutputter
// Output anti-framing headers to prevent clickjacking (respected by newer
// browsers).
if (common_config('javascript', 'bustframes')) {
header('X-XSS-Protection 1; mode=block'); // detect XSS Reflection attacks
header('X-XSS-Protection: 1; mode=block'); // detect XSS Reflection attacks
header('X-Frame-Options: SAMEORIGIN'); // no rendering if origin mismatch
}

View File

@ -311,7 +311,7 @@ function main($usercount, $groupcount, $noticeavg, $subsavg, $joinsavg, $tagmax)
}
}
$defaultWordfile = '/usr/share/dict/words';
$defaultWordsfile = '/usr/share/dict/words';
$usercount = (have_option('u', 'users')) ? get_option_value('u', 'users') : 100;
$groupcount = (have_option('g', 'groups')) ? get_option_value('g', 'groups') : 20;
@ -321,14 +321,14 @@ $joinsavg = (have_option('j', 'joins')) ? get_option_value('j', 'joins') : 5;
$tagmax = (have_option('t', 'tags')) ? get_option_value('t', 'tags') : 10000;
$userprefix = (have_option('x', 'prefix')) ? get_option_value('x', 'prefix') : 'testuser';
$groupprefix = (have_option('z', 'groupprefix')) ? get_option_value('z', 'groupprefix') : 'testgroup';
$wordsfile = (have_option('w', 'words')) ? get_option_value('w', 'words') : $defaultWordfile;
$wordsfile = (have_option('w', 'words')) ? get_option_value('w', 'words') : $defaultWordsfile;
if (is_readable($wordsfile)) {
$words = file($wordsfile);
} else {
if ($wordsfile != $defaultWordfile) {
if ($wordsfile != $defaultWordsfile) {
// user specified words file couldn't be read
throw new Exception("Couldn't read words file: {$wordfile}.");
throw new Exception("Couldn't read words file: {$wordsfile}.");
}
$words = null;
}