[aur-dev] [PATCH v2 01/10] Use raw scanner mode in config_get()

Lukas Fleischer archlinux at cryptocrack.de
Sat Dec 27 11:51:37 UTC 2014


We do not want PHP to parse the values for us. Use raw scanner mode to
avoid issues with certain values, such as regular expressions.

Signed-off-by: Lukas Fleischer <archlinux at cryptocrack.de>
---
 web/lib/confparser.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/lib/confparser.inc.php b/web/lib/confparser.inc.php
index 41ee581..3977911 100644
--- a/web/lib/confparser.inc.php
+++ b/web/lib/confparser.inc.php
@@ -4,7 +4,7 @@ function config_get($section, $key) {
 	global $AUR_CONFIG;
 
 	if (!isset($AUR_CONFIG)) {
-		$AUR_CONFIG = parse_ini_file("../../conf/config", true);
+		$AUR_CONFIG = parse_ini_file("../../conf/config", true, INI_SCANNER_RAW);
 	}
 
 	return $AUR_CONFIG[$section][$key];
-- 
2.2.1


More information about the aur-dev mailing list