From a2cbc7f646a54cc2c19adc5f76a2ba1003e25c3c Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 24 Oct 2015 18:03:19 +0200 Subject: aurjson: Allow underscores in JSONP callback names Signed-off-by: Lukas Fleischer --- web/lib/aurjson.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web') diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php index 15482327..9097035f 100644 --- a/web/lib/aurjson.class.php +++ b/web/lib/aurjson.class.php @@ -119,7 +119,7 @@ class AurJSON { if (isset($http_data['callback'])) { $callback = $http_data['callback']; - if (!preg_match('/^[a-zA-Z0-9().]{1,128}$/D', $callback)) { + if (!preg_match('/^[a-zA-Z0-9()_.]{1,128}$/D', $callback)) { return $this->json_error('Invalid callback name.'); } header('content-type: text/javascript'); -- cgit v1.2.3-24-g4f1b