Applied extensive leaked secret protection
This commit is contained in:
@@ -14,7 +14,7 @@ export interface ApiSettings {
|
||||
}
|
||||
|
||||
export interface HasherSettings {
|
||||
Salt: string;
|
||||
Salt?: string;
|
||||
MinHashLength: number;
|
||||
}
|
||||
|
||||
@@ -40,11 +40,11 @@ export const defaultApiSettings: ApiSettings = {
|
||||
};
|
||||
|
||||
export const defaultHasherSettings: HasherSettings = {
|
||||
Salt: 'TGlnaHQgQ2hhcm1zLCBNaWRyYW5kQm9va3MgbWFrZSBsb3RzIG9mIG1vbmV5IGFuZCBhcmUgYSBzdWNjZXNzZnVsIHZpcmFsIHN0b3J5IGluIFNvdXRoIEFmcmljYQ==',
|
||||
Salt: '',
|
||||
MinHashLength: 11,
|
||||
};
|
||||
|
||||
function syncAllHasherSettings(salt: string, minHashLength: number): void {
|
||||
function syncAllHasherSettings(salt: string | undefined, minHashLength: number): void {
|
||||
updateToolsHasherSettings(salt, minHashLength);
|
||||
updateUtilsHasherSettings(salt, minHashLength);
|
||||
}
|
||||
@@ -233,7 +233,7 @@ function resolveConfig(fetchedJson?: Record<string, any>): AppConfig {
|
||||
fetchCfg.hasherSalt,
|
||||
envCfg.hasherSalt,
|
||||
defaultHasherSettings.Salt
|
||||
)!;
|
||||
);
|
||||
const hasherMinLength =
|
||||
winCfg.hasherMinLength ||
|
||||
fetchCfg.hasherMinLength ||
|
||||
@@ -252,7 +252,7 @@ function resolveConfig(fetchedJson?: Record<string, any>): AppConfig {
|
||||
BaseUrl: baseUrl,
|
||||
},
|
||||
HasherSettings: {
|
||||
Salt: hasherSalt,
|
||||
Salt: hasherSalt || '',
|
||||
MinHashLength: hasherMinLength,
|
||||
},
|
||||
ConfigSource: source,
|
||||
|
||||
Reference in New Issue
Block a user