-
Notifications
You must be signed in to change notification settings - Fork 59
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
Fix issue 404 redirect after login as attendee with tickets #208
Fix issue 404 redirect after login as attendee with tickets #208
Conversation
Reviewer's Guide by SourceryThis pull request fixes a 404 redirect issue that occurred after login as an attendee with tickets. The change involves modifying the 'next' parameter in the login URL to use the current path instead of a hardcoded value. No sequence diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @lcduong - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please provide more details on how this change was tested. Given that it affects login redirects, thorough testing is important.
- The PR description could be more detailed. Please explain the root cause of the issue and why this change fixes it. Also, consider any potential side effects of using the current path for all redirects.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟡 Security: 1 issue found
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
@@ -23,7 +23,7 @@ | |||
{% if eventyay_exists %} | |||
{% if not no_buttons %} | |||
<div class="text-center"> | |||
<a class="btn btn-lg btn-primary btn-block mt-3" href="{% provider_login_url request.event.organiser.slug %}?next=/{{ request.event.slug }}/schedule/"> | |||
<a class="btn btn-lg btn-primary btn-block mt-3" href="{% provider_login_url request.event.organiser.slug %}?next={{ request.path }}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 suggestion (security): Consider security implications of using request.path
The change from a hardcoded path to request.path could improve user experience by returning users to their original page after login. However, ensure that request.path is properly sanitized to prevent potential security issues like open redirects. Consider adding appropriate validation for the path before using it in the URL.
<a class="btn btn-lg btn-primary btn-block mt-3" href="{% provider_login_url request.event.organiser.slug %}?next={% url 'event-schedule' event=request.event.slug %}">
{% translate "Login as Attendee with Eventyay-Ticket" %}
</a>
This PR fix issue 404 redirect after login as attendee with tickets by get current path.
How has this been tested?
Checklist
Summary by Sourcery
Fix the 404 redirect issue for attendees logging in with tickets by ensuring the redirect URL uses the current path.
Bug Fixes: