Skip to content
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

master->r3.2.0 #2257

Merged
merged 9 commits into from
May 31, 2024
2 changes: 1 addition & 1 deletion .github/workflows/build-landing-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- master
- 'release/**'
- "release/**"
paths:
- "landing-page/src/**"
- .github/workflows/build-landing-page.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-responders-portal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- master
- 'release/**'
- "release/**"
paths:
- "responders/src/API/**"
- "responders/src/UI/**"
Expand Down
2 changes: 1 addition & 1 deletion oauth-server/src/API/OAuthServer/OAuthServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageReference Include="IdentityModel" Version="7.0.0" />
<PackageReference Include="IdentityServer4.Contrib.RedisStore" Version="4.0.0" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="4.1.2" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="8.0.5" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.5" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,6 @@
* @param selectedESSFile selected ess file
*/
async openESSFile(selectedESSFile: EvacuationFileSearchResultModel) {
const shouldProceed = await firstValueFrom(
this.dialog
.open<AccessReasonGateDialogComponent, AccessReasonData>(AccessReasonGateDialogComponent, {
data: {
accessEntity: this.evacueeSearchService.evacueeSearchContext.hasShownIdentification
? 'essFile'
: 'secretWord',
entityId: selectedESSFile.id
}
})
.afterClosed()
);

if (!shouldProceed) return;

this.essFilesResultsService.setSelectedFile(selectedESSFile.id);
const profile$ = await this.essFilesResultsService.getSearchedUserProfile(selectedESSFile);
if (this.evacueeSessionService.isPaperBased) {
Expand All @@ -103,6 +88,9 @@
) {
this.essFilesResultsService.openUnableAccessESSFileDialog();
} else {
const shouldProceed = await this.openAccessReasonGateDialog(selectedESSFile);

if (!shouldProceed) return;
this.router.navigate(['responder-access/search/essfile-dashboard']);
}
} else {
Expand All @@ -116,8 +104,11 @@
next: (results) => {
this.essFilesResultsService.setloadingOverlay(false);
this.essFileSecurityPhraseService.securityPhrase = results;
setTimeout(() => {
setTimeout(async () => {
const shouldProceed = await this.openAccessReasonGateDialog(selectedESSFile);

if (!shouldProceed) return;
this.router.navigate(['responder-access/search/security-phrase']);

Check notice

Code scanning / devskim

If untrusted data (data from HTTP requests, user submitted files, etc.) is included in an setTimeout statement it can allow an attacker to inject their own code. Note

Review setTimeout for untrusted data
}, 200);
},
error: (error) => {
Expand All @@ -127,11 +118,29 @@
}
});
} else {
const shouldProceed = await this.openAccessReasonGateDialog(selectedESSFile);

if (!shouldProceed) return;
this.router.navigate(['responder-access/search/essfile-dashboard']);
}
}
}

openAccessReasonGateDialog(selectedESSFile: EvacuationFileSearchResultModel) {
return firstValueFrom(
this.dialog
.open<AccessReasonGateDialogComponent, AccessReasonData>(AccessReasonGateDialogComponent, {
data: {
accessEntity: this.evacueeSearchService.evacueeSearchContext.hasShownIdentification
? 'essFile'
: 'secretWord',
entityId: selectedESSFile.id
}
})
.afterClosed()
);
}

/**
* Returns community name
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,6 @@
* @param selectedRegistrant selected profile
*/
async openProfile(selectedRegistrant: RegistrantProfileSearchResultModel) {
const shouldProceed = await firstValueFrom(
this.dialog
.open<AccessReasonGateDialogComponent, AccessReasonData, boolean>(AccessReasonGateDialogComponent, {
data: {
accessEntity: 'profile',
entityId: selectedRegistrant.id
}
})
.afterClosed()
);

if (!shouldProceed) return;

if (
this.evacueeSessionService.isPaperBased &&
!this.evacueeSearchService.evacueeSearchContext.hasShownIdentification
Expand All @@ -107,6 +94,9 @@
} else {
this.profileResultsService.updateProfile(selectedRegistrant);
if (this.evacueeSearchService.evacueeSearchContext.hasShownIdentification) {
const shouldProceed = await this.openAccessReasonGateDialog(selectedRegistrant);

if (!shouldProceed) return;
this.router.navigate(['responder-access/search/evacuee-profile-dashboard']);
} else {
this.profileResultsService.setloadingOverlay(true);
Expand All @@ -120,8 +110,11 @@
} else {
this.profileSecurityQuestionsService.shuffleSecurityQuestions(results?.questions);
this.evacueeSessionService.securityQuestionsOpenedFrom = 'responder-access/search/evacuee';
setTimeout(() => {
setTimeout(async () => {
const shouldProceed = await this.openAccessReasonGateDialog(selectedRegistrant);

if (!shouldProceed) return;
this.router.navigate(['responder-access/search/security-questions']);

Check notice

Code scanning / devskim

If untrusted data (data from HTTP requests, user submitted files, etc.) is included in an setTimeout statement it can allow an attacker to inject their own code. Note

Review setTimeout for untrusted data
}, 200);
}
},
Expand All @@ -135,6 +128,19 @@
}
}

async openAccessReasonGateDialog(selectedRegistrant: RegistrantProfileSearchResultModel) {
return firstValueFrom(
this.dialog
.open<AccessReasonGateDialogComponent, AccessReasonData, boolean>(AccessReasonGateDialogComponent, {
data: {
accessEntity: 'profile',
entityId: selectedRegistrant.id
}
})
.afterClosed()
);
}

/**
* Returns community name
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,11 @@
<mat-checkbox formControlName="processEvacueeCert"
>Evacuee confirms they understand the above statement.
</mat-checkbox>
<mat-error
class="custom-mat-error"
*ngIf="
referralFormControl?.processEvacueeCert.invalid &&
referralFormControl?.processEvacueeCert.hasError('required')
"
>
Required</mat-error
>
@if (
referralFormControl?.processEvacueeCert.invalid && referralFormControl?.processEvacueeCert.hasError('required')
) {
<mat-error class="custom-mat-error"> Required</mat-error>
}
</div>
</div>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="system.io.abstractions.testinghelpers" Version="21.0.2" />
<PackageReference Include="xunit" Version="2.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down