Skip to content

Commit 55c229a

Browse files
authored
Merge 548116a into 27ed671
2 parents 27ed671 + 548116a commit 55c229a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ydb/core/mon/async_http_mon.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,15 @@ class THttpMonLegacyActorRequest : public TActorBootstrapped<THttpMonLegacyActor
356356
return ReplyErrorAndPassAway(result);
357357
}
358358
bool found = false;
359-
for (const TString& sid : ActorMonPage->AllowedSIDs) {
360-
if (result.UserToken->IsExist(sid)) {
361-
found = true;
362-
break;
359+
if (result.UserToken) {
360+
for (const TString& sid : ActorMonPage->AllowedSIDs) {
361+
if (result.UserToken->IsExist(sid)) {
362+
found = true;
363+
break;
364+
}
363365
}
364366
}
365-
if (found || ActorMonPage->AllowedSIDs.empty()) {
367+
if (found || ActorMonPage->AllowedSIDs.empty() || !result.UserToken) {
366368
SendRequest(&result);
367369
} else {
368370
return ReplyForbiddenAndPassAway("SID is not allowed");

0 commit comments

Comments
 (0)