Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
modules/context/auth.go: fix redirect loop #5965
Heya! I've actually just tested this on my own server and noticed the bug. It's not good that this was missed - I'm sorry about that.
We should probably change our integration tests to ensure we hit these potential bugs - always query Gitea without the suburl but always expect the suburl back etc.
In terms of fixing the other redirects - perhaps we should add a redirected from Param to the query and if we end up attempting to redirect back to the same place we should return forbidden.
referenced this pull request
Feb 8, 2019
@@ Coverage Diff @@ ## master #5965 +/- ## ========================================== + Coverage 38.86% 38.86% +<.01% ========================================== Files 345 345 Lines 49508 49508 ========================================== + Hits 19241 19243 +2 + Misses 27485 27482 -3 - Partials 2782 2783 +1