projects
/
wiki.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Edit page FrontPage
[wiki.git]
/
sys
/
macros
/
CgiVar.py
diff --git
a/sys/macros/CgiVar.py
b/sys/macros/CgiVar.py
index c2ba707f1eca16a60ee7ab728a7660ff528e24f4..807662c423cf0ea977f662cb4246595ddeb07f24 100644
(file)
--- a/
sys/macros/CgiVar.py
+++ b/
sys/macros/CgiVar.py
@@
-1,9
+1,14
@@
#acl bernie:read,write All:read
#acl bernie:read,write All:read
+#FIXME: couldn't we just return any env variable?
+# Would there be any security issues?
def _macro_CgiVar(*args, **kvargs):
def _macro_CgiVar(*args, **kvargs):
+ if args[1].startswith('HTTP_'):
+ return os.environ.get(args[1], '')
return {
return {
+ 'SCRIPT_NAME': script_name(),
'REMOTE_USER': remote_user(),
'REMOTE_HOST': get_hostname(remote_host()),
'REMOTE_ADDR': remote_host(),
'REMOTE_USER': remote_user(),
'REMOTE_HOST': get_hostname(remote_host()),
'REMOTE_ADDR': remote_host(),
- 'QUERY_STRING':
relative_url(query_string()
),
+ 'QUERY_STRING':
query_string(
),
}[args[1]]
}[args[1]]