question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blocks view fails if blocked usernames contain + sign

See original GitHub issue

I’m using a system where we use emails as usernames.

If an username like user+test@domain.tld gets blocked, then the rendering of /admin/defender/blocks/ fails with the following error:

Reverse for ‘defender_unblock_username_view’ with arguments ‘(u’user+test@domain.tld’,)’ and keyword arguments ‘{}’ not found. 1 pattern(s) tried: [u’admin/defender/blocks/username/(?P<username>[A-Za-z0-9-._@]+)/unblock$']

Obviously that’s because the + is not in the group of allowed chars for the regexp. Can we make the regexp a bit more permissive? I understand a + sign is OK in an URL and as part of a username.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kencochranecommented, Jun 8, 2017

That sounds fine, feel free to submit a PR and I’ll review, and if it looks good, we can merge.

0reactions
kencochranecommented, Jun 13, 2017

Thanks, closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

3 ways to tell if you've been blocked on Snapchat
If you suspect someone has blocked you, search for their username, check your conversations, or try to message them via Snapchat.
Read more >
How to Check If Someone Blocked You on Instagram: 7 Methods
Have I Been Blocked on Instagram? · 1. Search for Their Username · 2. Search Through Your Profile · 3. Use the Instagram...
Read more >
How to Fix Failed Website Logins Blocked by ... - YouTube
If you are a Google Chrome user then its easy to block or unblock cookies from being placed on your computer from the...
Read more >
How To Tell if Someone Blocked you on Snapchat - Alphr
You may see a message that says, “Sorry, couldn't find that username.” This is not normal and could be another indication that they...
Read more >
How to Know If Someone Has Blocked You on Snapchat (2022)
If you have indeed been blocked, your message will not be sent and you will get a message saying “Failed to send –...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found