-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5afb2ed
commit d90fae3
Showing
2 changed files
with
5 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,7 @@ | |
*/ | ||
|
||
export const saveData = (key: string, value: string) => { | ||
try { | ||
localStorage.setItem(key, value); | ||
} catch (e) { | ||
/* | ||
* If localStorage is disabled or blocked by the browser, | ||
* a SecurityError exception will be thrown when trying to access localStorage. | ||
* If the key or value argument passed to localStorage.setItem() is not a string, | ||
* a TypeError exception will be thrown. | ||
* If the user has exceeded the storage quota for localStorage, | ||
* a QuotaExceededError exception will be thrown. | ||
*/ | ||
throw e; | ||
} | ||
localStorage.setItem(key, value); | ||
Check failure Code scanning / CodeQL Clear text storage of sensitive information High
This stores sensitive data returned by
an access to newTrustedApp Error loading related location Loading This stores sensitive data returned by an access to trustedApp Error loading related location Loading This stores sensitive data returned by an access to trustedApps Error loading related location Loading This stores sensitive data returned by an access to stringifiedNewTrustedApps Error loading related location Loading This stores sensitive data returned by an access to trustedApps Error loading related location Loading This stores sensitive data returned by an access to mockTrustedApp Error loading related location Loading This stores sensitive data returned by an access to mockTrustedApp Error loading related location Loading This stores sensitive data returned by an access to trustedApps Error loading related location Loading This stores sensitive data returned by an access to stringifiedTrustedApps Error loading related location Loading This stores sensitive data returned by an access to updatedTrustedApp Error loading related location Loading This stores sensitive data returned by an access to trustedApps Error loading related location Loading This stores sensitive data returned by an access to mockTrustedApp Error loading related location Loading This stores sensitive data returned by an access to mockTrustedApp2 Error loading related location Loading This stores sensitive data returned by an access to mockTrustedApp Error loading related location Loading This stores sensitive data returned by an access to mockTrustedApp Error loading related location Loading This stores sensitive data returned by an access to mockTrustedApp Error loading related location Loading This stores sensitive data returned by an access to mockTrustedApp Error loading related location Loading This stores sensitive data returned by an access to mockTrustedApp as clear text. This stores sensitive data returned by an access to mockTrustedApp as clear text. |
||
}; | ||
|
||
export const loadData = (key: string) => { | ||
|
@@ -35,15 +23,5 @@ export const loadData = (key: string) => { | |
}; | ||
|
||
export const removeData = (key: string) => { | ||
try { | ||
localStorage.removeItem(key); | ||
} catch (e) { | ||
/* | ||
* If localStorage is disabled or blocked by the browser, | ||
* a SecurityError exception will be thrown when trying to access localStorage. | ||
* If the key argument passed to localStorage.removeItem() is not a string, | ||
* a TypeError exception will be thrown. | ||
*/ | ||
throw e; | ||
} | ||
localStorage.removeItem(key); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters