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: Ie35774b610b08e1e412394bd2ec544c013ac8730
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/AppComponent.ts b/src/app/AppComponent.ts
index 04ad8d8..5af5609 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();
}
});