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

Add decoding for params from url #376

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mastervolkov
Copy link
Contributor

If password on the redis server uses characters that require encoding in the URL ("?", "*"), then the decoding will not happen and the password will always be incorrect. Password encoding is always carried out, therefore, decoding should also always be done.

…assword with characters that require encoding.
@ThomasThelen ThomasThelen mentioned this pull request Jun 19, 2023
@ThomasThelen
Copy link

Steps I used to run

  • virtualenv env
  • source env/bin/activate
  • pip install -r requirements.txt
  • python setup.py develop
  • docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest
  • redis cli
  • (within cli, set the password that includes encoded params) config set requirepass p@ss$12E45**?
  • rq-dashboard

See the error below; it looks like there was some work done around this function upstream here, which could have put this branch in a bad state. This branch should most likely needs a rebase to pick it up.

(env) thomas@Thomass-MacBook-Pro rq-dashboard % rq-dashboard
Traceback (most recent call last):
  File "/Users/thomas/rq-dashboard/env/bin/rq-dashboard", line 33, in <module>
    sys.exit(load_entry_point('rq-dashboard', 'console_scripts', 'rq-dashboard')())
  File "/Users/thomas/rq-dashboard/env/bin/rq-dashboard", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/Users/thomas/.pyenv/versions/3.10.3/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/Users/thomas/.pyenv/versions/3.10.3/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/thomas/rq-dashboard/rq_dashboard/__init__.py", line 3, in <module>
    from .web import blueprint
  File "/Users/thomas/rq-dashboard/rq_dashboard/web.py", line 61, in <module>
    @blueprint.before_app_first_request
AttributeError: 'Blueprint' object has no attribute 'before_app_first_request'. Did you mean: 'before_app_request'?

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

Successfully merging this pull request may close these issues.

2 participants