-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Enabling username and passwords to be obfuscated
- Loading branch information
1 parent
14a3090
commit cff7dff
Showing
2 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
from rq import Queue, Worker, pop_connection, push_connection | ||
|
||
from rq_dashboard.cli import make_flask_app | ||
from rq_dashboard.web import escape_format_instance_list | ||
|
||
|
||
HTTP_OK = 200 | ||
|
@@ -107,6 +108,20 @@ def test_worker_version_field(self): | |
w.register_death() | ||
|
||
|
||
def test_instance_escaping(self): | ||
expected_redis_instance = "redis://***:***@redis.example.com:6379" | ||
self.assertEqual( | ||
escape_format_instance_list( | ||
[ | ||
"redis://myuser:[email protected]:6379", | ||
"redis://:[email protected]:6379", | ||
"redis://:@redis.example.com:6379", | ||
] | ||
), | ||
[expected_redis_instance, expected_redis_instance, expected_redis_instance], | ||
) | ||
|
||
|
||
__all__ = [ | ||
'BasicTestCase', | ||
] | ||
] |