mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-16 15:13:31 +00:00
when no regatta is found for a leaderboard name but no secret to skip has been specified either, apply regular security checks instead of failing with an NPE
Change-Id: I54a540ec8adb6e1d0d364f5b55302edf068c336f
This commit is contained in:
1 parent
77c8925c5c
commit
78f5c70ead
1 file changed
+6
-4
+6
-4
@@ -884,10 +884,12 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch
|
||||
result = false;
|
||||
} else {
|
||||
Regatta regatta = getRegattaByName(leaderboardName);
|
||||
if (regatta == null && secret != null) {
|
||||
logger.warning(
|
||||
"Attempt to skip security checks using regatta secret \"" + secret + "\" for leaderboard \""
|
||||
+ leaderboardName + "\", but a regatta with the same name could not be resolved");
|
||||
if (regatta == null) {
|
||||
if (secret != null) {
|
||||
logger.warning(
|
||||
"Attempt to skip security checks using regatta secret \"" + secret + "\" for leaderboard \""
|
||||
+ leaderboardName + "\", but a regatta with the same name could not be resolved");
|
||||
} // else regatta not found, but no secret specified either; checks won't be skipped, but no skipping was really requested
|
||||
result = false;
|
||||
} else {
|
||||
result = Util.equalStringsWithEmptyIsNull(regatta.getRegistrationLinkSecret(), secret);
|
||||
|
||||
Reference in new issue
Block a user