redis-commander
redis-commander copied to clipboard
Unable to see value of specific string keys
We've noticed that we're unable to see the values of certain keys that we create programattically in redis. If we create them manually via redis-commander they appear. They also appear when using RedisInsight, so this appears to be unique to redis commander. Example of a key:

The only other item that is notable is that this entry has no TTL.
We expected to see a value of True or False displayed under the key name, but instead see nothing.
The other item that's notable is that we've changed the default folding character from : to |. However, reverting that change made no impact.
I've since discovered that this only occurs when hosting redis-commander in Azure under node 12.13 on Windows. The same code works fine locally on a VM with node 12.16; I doubt this is a version issue but Azure does not yet have 12.16 available.
Hi - can you please give some more informations to find out whats different?
- Redis server version?
- Output of redis command "TYPE <problematic_key>"?
- Output of redis command "GET <problematic_key>"?
And you said problem only happens on Azure. I assume booth redis commander (Azure and local) use the same Redis server to display data from?
Thanks for replying! The version of redis is 4.0.14. Correct - redis commander on local and Azure point to the same Redis server.
TYPE <problematic_key> is "string" GET <problematic_key> is "True"
One more item - this appears to occur when there is a // in the keyname. ex: SET Test-https://www.test.com/site False displays in redis-commander as Test-https:/www.test.com/site,with no value displayed. however, GET Test-https://www.test.com/site works and shows the value.
currently i am unable to reproduce it and i have no clue about he reasons. I tested with the latest version from github (master branch).
Are there some error messages inside the browsers javascript console? No log messages of redis commander server process?
The Azure redis is a Azure db as a service or something you started yourself (VM or container or something like it).
btw - the docker image is currently running on Node 8, Node 10 should work fine too if its a problem with the node version inside Azure...
Hi,
Same problem here. For us it's due to a nginx proxy pass (https://serverfault.com/questions/459369/disabling-url-decoding-in-nginx-proxy)
For example if your key is a:b:{"url","https,//c.com"}
then redis-commander will call /key/<some-connectionId>/a%3Ab%3A%7B"url"%2C"https%2C%2F%2Fc.com"%7D
that will become /key/<some-connectionId>/a:b:{"url","https,/c.com"} (with one slash) when received by redis-commander server.
if you want @sseide i can create a PR with a function like this on front side to build key in url :
window.btoa('a:b:{"url","https,//c.com"}')
.replace(/\+/g, '-') // (https://en.wikipedia.org/wiki/Base64#Base64_table)
.replace(/\//g, '_')
.replace(/=/g, '.')
// => 'YTpiOnsidXJsIiwiaHR0cHMsLy9jLmNvbSJ9'
and then on server-side to get the original key back
Buffer.from(
'YTpiOnsidXJsIiwiaHR0cHMsLy9jLmNvbSJ9'
.replace(/-/g, '+')
.replace(/_/g, '/')
.replace(/\./g, '='),
'base64',
).toString()
// => `a:b:{"url","https,//c.com"}`
it will protect the key integrity no matter the architecture above