Merged
Conversation
If the matched choice legitimately had no feedback, this log statement was printed despite not being accurate. Using 3VL for `responseCorrect` allows us to detect whether a choice was matched.
We had an odd mix of paramterised and String.format(...) messages, but we can just uniformly use paramterised messages regardless of whether the input might be user-controlled or not.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #775 +/- ##
==========================================
+ Coverage 40.11% 40.13% +0.01%
==========================================
Files 547 546 -1
Lines 23868 23797 -71
Branches 2899 2900 +1
==========================================
- Hits 9574 9550 -24
+ Misses 13382 13335 -47
Partials 912 912 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
7ad86c7 to
7d52a5b
Compare
# Conflicts: # src/main/java/uk/ac/cam/cl/dtg/segue/api/managers/UserAuthenticationManager.java
I inadvertently removed it too soon in acc1d27
This prints exactly the same detail about the object as it used to, but now without falling back to Object::toString.
If we don't load a partiallyLoggedInUser, we aren't actually verifying the code against an account, so it likely does not matter that it happened when considering rate limiting; it could exhaust resources, but it won't leak information.
axlewin
approved these changes
Apr 20, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We should always use parameterised log messages, regardless of whether the data is user-provided or not.
I have tried to leave the case in
UserAuthenticationManager.javaalone, since it is fixed in the cookies PR and will conflict if I change it here (may not be enough to avoid a conflict anyhow).Also a few small bits of cleaning up, including fixing some incorrect logger initialisations!