summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-10-24 18:03:19 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-10-24 18:03:19 +0200
commita2cbc7f646a54cc2c19adc5f76a2ba1003e25c3c (patch)
treeb846b2b74d3558d03a4b11d5c6e670cef2189bd0 /web
parent8c87b1df0c0273006892d5947aad64034ee8ec9d (diff)
downloadaurweb-a2cbc7f646a54cc2c19adc5f76a2ba1003e25c3c.tar.xz
aurjson: Allow underscores in JSONP callback names
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web')
-rw-r--r--web/lib/aurjson.class.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php
index 1548232..9097035 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');