[geeklog-cvs] geeklog: Allow parameters in the URL of the files loaded by the ...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Fri Mar 23 16:36:53 EDT 2012
changeset 8553:e9f1f3fb357d
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/e9f1f3fb357d
user: Rouslan Placella <rouslan at placella.com>
date: Fri Mar 23 19:37:20 2012 +0000
description:
Allow parameters in the URL of the files loaded by the SCRIPTS class.
diffstat:
system/classes/scripts.class.php | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diffs (25 lines):
diff -r 048e06f372c9 -r e9f1f3fb357d system/classes/scripts.class.php
--- a/system/classes/scripts.class.php Fri Mar 23 19:25:20 2012 +0000
+++ b/system/classes/scripts.class.php Fri Mar 23 19:37:20 2012 +0000
@@ -289,6 +289,10 @@
// Make sure file exists and is readable. We don't want any 403 or 404, right?
$path = substr($_CONF['path_html'], 0, -1) . $file;
+ // Strip parameters
+ if (strrpos($path, '?') !== false) {
+ $path = substr($path, 0, strrpos($path, '?'));
+ }
if (! is_file($path) || ! is_readable($path)) {
return false;
}
@@ -367,6 +371,10 @@
// Make sure file exists and is readable. We don't want any 403 or 404, right?
$path = substr($_CONF['path_html'], 0, -1) . $file;
+ // Strip parameters
+ if (strrpos($path, '?') !== false) {
+ $path = substr($path, 0, strrpos($path, '?'));
+ }
if (! is_file($path) || ! is_readable($path)) {
return false;
}
More information about the geeklog-cvs
mailing list