Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
7c33ab76
Commit
7c33ab76
authored
6 years ago
by
Amber Brown
Browse files
Options
Downloads
Patches
Plain Diff
redact better
parent
63755fa4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/http/__init__.py
+2
-2
2 additions, 2 deletions
synapse/http/__init__.py
with
2 additions
and
2 deletions
synapse/http/__init__.py
+
2
−
2
View file @
7c33ab76
...
@@ -38,12 +38,12 @@ def cancelled_to_request_timed_out_error(value, timeout):
...
@@ -38,12 +38,12 @@ def cancelled_to_request_timed_out_error(value, timeout):
return
value
return
value
ACCESS_TOKEN_RE
=
re
.
compile
(
b
r
'
(\?.*access(_|%5[Ff])token=)[^&]*(.*)$
'
)
ACCESS_TOKEN_RE
=
re
.
compile
(
r
'
(\?.*access(_|%5[Ff])token=)[^&]*(.*)$
'
)
def
redact_uri
(
uri
):
def
redact_uri
(
uri
):
"""
Strips access tokens from the uri replaces with <redacted>
"""
"""
Strips access tokens from the uri replaces with <redacted>
"""
return
ACCESS_TOKEN_RE
.
sub
(
return
ACCESS_TOKEN_RE
.
sub
(
b
r
'
\1<redacted>\3
'
,
r
'
\1<redacted>\3
'
,
uri
uri
)
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment