Coverity-CWE 922: Insecure Storage of Sensitive Information(localStorage write)
- Coverity fix for localStorage write issue: For storing datas
in browser localStorage so changed it to sessionStorage
Change-Id: I3fdce439b923e006b44a50a42fab19b7ffbcdec6
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/AppComponent.ts b/src/app/AppComponent.ts
index 4567671..1c5886a 100644
--- a/src/app/AppComponent.ts
+++ b/src/app/AppComponent.ts
@@ -86,7 +86,7 @@
public idleTimeOut(): void {
this.idle.onTimeout.subscribe(() => {
this.idle.stop();
- if (localStorage.getItem('id_token') !== null) {
+ if (sessionStorage.getItem('id_token') !== null) {
this.authService.logout();
}
});