Commit f88a81d7 authored by dsnopek's avatar dsnopek Committed by dsnopek

Issue #2955130 by dsnopek: [core] Add D6LTS patch for SA-CORE-2018-002 (bug fix)

parent 9fb2ea24
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index bfbbb81..5654dde 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -1654,6 +1654,8 @@ function _drupal_bootstrap_sanitize_input(&$input, $whitelist = array()) {
$sanitized_keys = array_merge($sanitized_keys, _drupal_bootstrap_sanitize_input($input[$key], $whitelist));
}
}
+ // PHP 5.x will leave the array pointer at the end without this.
+ reset($input);
}
return $sanitized_keys;
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 23179ca98d..bfbbb81876 100644
index 23179ca..5654dde 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -1142,6 +1142,7 @@ function _drupal_bootstrap($phase) {
......@@ -10,7 +10,7 @@ index 23179ca98d..bfbbb81876 100644
break;
case DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE:
@@ -1603,3 +1604,57 @@ function filter_xss_bad_protocol($string, $decode = TRUE) {
@@ -1603,3 +1604,59 @@ function filter_xss_bad_protocol($string, $decode = TRUE) {
} while ($before != $string);
return check_plain($string);
}
......@@ -64,6 +64,8 @@ index 23179ca98d..bfbbb81876 100644
+ $sanitized_keys = array_merge($sanitized_keys, _drupal_bootstrap_sanitize_input($input[$key], $whitelist));
+ }
+ }
+ // PHP 5.x will leave the array pointer at the end without this.
+ reset($input);
+ }
+
+ return $sanitized_keys;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment