1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-24 22:39:21 +00:00

Hard code maximum size for virtual directory

This commit is contained in:
Pierre HUBERT 2020-04-02 18:33:28 +02:00
parent 618e2c143f
commit a083de5947

View File

@ -18,7 +18,7 @@ export enum VirtualDirType {
* @param dir The virtual directory to check
*/
export function checkVirtualDirectory(dir: string) : boolean {
if(dir.length < 4) return false;
if(dir.length < 4 || dir.length > 30) return false;
for(let el of [".html", ".txt", ".php", "à", "â", "é", "ê", "@", "/", "\"", "'", '"', "<", ">", "?", "&", "#"])
if(dir.includes(el))