summaryrefslogtreecommitdiff
path: root/ext/filter/logical_filters.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/filter/logical_filters.c')
-rw-r--r--ext/filter/logical_filters.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c
index 392156b539..1e4925b421 100644
--- a/ext/filter/logical_filters.c
+++ b/ext/filter/logical_filters.c
@@ -240,6 +240,13 @@ void php_filter_int(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
error = 1;
}
} else if (allow_octal) {
+ /* Support explicit octal prefix notation */
+ if (*p == 'o' || *p == 'O') {
+ p++; len--;
+ if (len == 0) {
+ RETURN_VALIDATION_FAILED
+ }
+ }
if (php_filter_parse_octal(p, len, &ctx_value) < 0) {
error = 1;
}