fitbodylife / phpmemcacheadmin

Automatically exported from code.google.com/p/phpmemcacheadmin
0 stars 0 forks source link

key URLs not encoded #21

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The URLs for memcache keys were not being encoded properly when trying to view 
them via the slab pages.

To fix this issue, we changed $key to encodeurl($key) in /View/Stats/Items.tpl, 
example below.

# diff View/Stats/Items.tpl View/Stats/Items.tpl.orig
35c35
<         onclick="javascript:executeHideShow('console', 'hide', 
true);javascript:executeCommand('container', 'request_key=<?php echo 
urlencode($key); ?>&amp;request_api=<?php echo $_ini->get('get_api'); 
?>&amp;request_command=get&amp;request_server=<?php echo $_GET['server']; 
?>');"><?php echo ((strlen($key) > 70) ? substr($key, 0, 70) . '[..]' : $key); 
?></a>

---
>         onclick="javascript:executeHideShow('console', 'hide', 
true);javascript:executeCommand('container', 'request_key=<?php echo $key; 
?>&amp;request_api=<?php echo $_ini->get('get_api'); 
?>&amp;request_command=get&amp;request_server=<?php echo $_GET['server']; 
?>');"><?php echo ((strlen($key) > 70) ? substr($key, 0, 70) . '[..]' : $key); 
?></a>

Original issue reported on code.google.com by rw.n...@gmail.com on 20 Jun 2013 at 3:31

GoogleCodeExporter commented 8 years ago
Forgot to mention that this caused an issue with URLs with items in them like 
+, /, etc. Since we are hashing our keys this happens quite a lot.

Original comment by rw.n...@gmail.com on 20 Jun 2013 at 3:32

GoogleCodeExporter commented 8 years ago
Any fix for the issue that the above fix caused?

Original comment by bpnar...@gmail.com on 25 Apr 2014 at 2:36

GoogleCodeExporter commented 8 years ago
The fix didn't cause an issue, not encoding the URLs properly is what caused 
the issue. My second comment was merely explaining why we were running into 
issues to begin with, sorry for any confusion.

Original comment by rw.n...@gmail.com on 12 Dec 2014 at 2:15