mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 10:01:22 +01:00
Relaxed file name sanitizing
This commit is contained in:
@@ -469,7 +469,11 @@ public class Helper {
|
||||
// Files
|
||||
|
||||
static String sanitizeFilename(String name) {
|
||||
return (name == null ? null : name.replaceAll("[^a-zA-Z0-9\\.\\-]", "_"));
|
||||
if (name == null)
|
||||
return null;
|
||||
return name
|
||||
.replace("\0", "_")
|
||||
.replace("/", "_");
|
||||
}
|
||||
|
||||
static String getExtension(String filename) {
|
||||
|
||||
Reference in New Issue
Block a user