Skip to content

Commit

Permalink
Bug-fix.
Browse files Browse the repository at this point in the history
Changelog excerpt: [2017.01.27; Bug-fix; Maikuolan]: When used,
"ban_override" would trigger any time any block occurred, instead of
only when the infraction limit had been exceeded; Fixed. #22
  • Loading branch information
Maikuolan committed Jan 27, 2017
1 parent f20257c commit ba6e1ec
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ Versioning guidelines for SemVer can be found at: http://www.semver.org/
- [2017.01.26; NEW FEATURE; Maikuolan]: Added a CIDR calculator to the
front-end.

- [2017.01.27; Bug-fix; Maikuolan]: When used, "ban_override" would trigger any
time any block occurred, instead of only when the infraction limit had been
exceeded; Fixed.

=== Version/Release 0.6.1 ===
PATCH RELEASE.

Expand Down
4 changes: 2 additions & 2 deletions vault/components.dat
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CIDRAM:
vi: Các gói thầu chính (mà không có các tập tin chữ ký, tài liệu, và cấu hình).
zh: 主包(没有签名文件,文档,和配置)。
zh-tw: 主包(沒有簽名文件,文檔,和配置)。
Version: 0.7.0-DEV+170126
Version: 0.7.0-DEV+170127
Minimum Required: 0.6.0-DEV
Minimum Required PHP: 5.4.0
Changelog: https://raw.githubusercontent.com/Maikuolan/CIDRAM/master/Changelog.txt
Expand Down Expand Up @@ -132,7 +132,7 @@ CIDRAM:
- 90f4e2597e0dfa411b65c4a1e8849c13:17575
- 5b6bbb6c353196a5cf2fe336fde2dc5a:2750
- 8e03209e7fc6641b45094e584340feff:83
- 41a3357aae64f5ddb9f9f357b6763a94:21390
- 802b70599e8d426693f88f2d694275ef:21444
- 10a8f11f9c09873ab71e50e128940503:1729
- 2f007322fe51be35be62b2931ac2ee93:11237
- c6dbda70eb05f08e2dd0ca41fe57661a:2810
Expand Down
10 changes: 5 additions & 5 deletions vault/outgen.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* License: GNU/GPLv2
* @see LICENSE.txt
*
* This file: Output generator (last modified: 2017.01.16).
* This file: Output generator (last modified: 2017.01.27).
*/

$CIDRAM['CacheModified'] = false;
Expand Down Expand Up @@ -57,8 +57,8 @@
'ScriptIdent' => $CIDRAM['ScriptIdent'],
'favicon' => $CIDRAM['favicon'],
'Query' => $CIDRAM['Query'],
'Referrer' => (empty($_SERVER['HTTP_REFERER'])) ? '' : $_SERVER['HTTP_REFERER'],
'UA' => (empty($_SERVER['HTTP_USER_AGENT'])) ? '' : $_SERVER['HTTP_USER_AGENT'],
'Referrer' => empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'],
'UA' => empty($_SERVER['HTTP_USER_AGENT']) ? '' : $_SERVER['HTTP_USER_AGENT'],
'ReasonMessage' => '',
'SignatureCount' => 0,
'Signatures' => '',
Expand Down Expand Up @@ -326,15 +326,15 @@
/** Parsed to the template file upon generating HTML output. */
$CIDRAM['Parsables'] = $CIDRAM['Config']['template_data'] + $CIDRAM['lang'] + $CIDRAM['BlockInfo'];

if ($CIDRAM['Config']['general']['ban_override'] === 403) {
if (!empty($CIDRAM['Banned']) && $CIDRAM['Config']['general']['ban_override'] === 403) {

$CIDRAM['errCode'] = 403;
header('HTTP/1.0 403 Forbidden');
header('HTTP/1.1 403 Forbidden');
header('Status: 403 Forbidden');
$CIDRAM['html'] = '';

} elseif ($CIDRAM['Config']['general']['ban_override'] === 503) {
} elseif (!empty($CIDRAM['Banned']) && $CIDRAM['Config']['general']['ban_override'] === 503) {

$CIDRAM['errCode'] = 503;
header('HTTP/1.0 503 Service Unavailable');
Expand Down

0 comments on commit ba6e1ec

Please sign in to comment.