mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-27 01:27:30 +09:00
[uri] Implement additional filename checks.
This commit is contained in:
parent
40c9102d6d
commit
9c8bd37fe5
1 changed files with 4 additions and 3 deletions
|
|
@ -1202,10 +1202,11 @@ nsExternalAppHandler::nsExternalAppHandler(nsIMIMEInfo * aMIMEInfo,
|
||||||
|
|
||||||
// Replace platform specific path separator and illegal characters to avoid any confusion
|
// Replace platform specific path separator and illegal characters to avoid any confusion
|
||||||
mSuggestedFileName.ReplaceChar(KNOWN_PATH_SEPARATORS, '_');
|
mSuggestedFileName.ReplaceChar(KNOWN_PATH_SEPARATORS, '_');
|
||||||
mSuggestedFileName.ReplaceChar(FILE_ILLEGAL_CHARACTERS, ' ');
|
mSuggestedFileName.ReplaceChar(FILE_ILLEGAL_CHARACTERS, '_');
|
||||||
mSuggestedFileName.ReplaceChar(char16_t(0), '_');
|
mSuggestedFileName.ReplaceChar("%", '_');
|
||||||
|
mSuggestedFileName.StripChar(char16_t(0));
|
||||||
mTempFileExtension.ReplaceChar(KNOWN_PATH_SEPARATORS, '_');
|
mTempFileExtension.ReplaceChar(KNOWN_PATH_SEPARATORS, '_');
|
||||||
mTempFileExtension.ReplaceChar(FILE_ILLEGAL_CHARACTERS, ' ');
|
mTempFileExtension.ReplaceChar(FILE_ILLEGAL_CHARACTERS, '_');
|
||||||
|
|
||||||
// Remove unsafe bidi characters which might have spoofing implications (bug 511521).
|
// Remove unsafe bidi characters which might have spoofing implications (bug 511521).
|
||||||
const char16_t unsafeBidiCharacters[] = {
|
const char16_t unsafeBidiCharacters[] = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue