Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

key URLs not encoded #21

Open
GoogleCodeExporter opened this issue Mar 27, 2015 · 3 comments
Open

key URLs not encoded #21

GoogleCodeExporter opened this issue Mar 27, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 20 Jun 2013 at 3:31

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 20 Jun 2013 at 3:32

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Any fix for the issue that the above fix caused?

Original comment by [email protected] on 25 Apr 2014 at 2:36

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 12 Dec 2014 at 2:15

  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant