mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 08:47:28 +01:00
[ion] Storage: make Storage::nameCompliant less restrictive (accepts
.*\.[a-z]+). But Script::nameCompliant is stricted: [a-z_0-9.]*
This commit is contained in:
@@ -25,4 +25,17 @@ const char * Script::readContent() const {
|
||||
return (const char *)d.buffer+k_importationStatusSize;
|
||||
}
|
||||
|
||||
bool Script::nameCompliant(const char * name) {
|
||||
/* The name format is [a-z0-9_.]* */
|
||||
const char * currentChar = name;
|
||||
while (*currentChar != 0) {
|
||||
if ((*currentChar >= 'a' && *currentChar <= 'z') || *currentChar == '_' || (*currentChar >= '0' && *currentChar <= '9') || *currentChar == '.') {
|
||||
currentChar++;
|
||||
continue;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return name != currentChar;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user