From: Nathan Wagner Date: Wed, 5 Dec 2018 11:03:29 +0000 (+0000) Subject: forbid package file paths . and .. X-Git-Tag: v0.3.6~7 X-Git-Url: https://pd.if.org/git/?p=zpackage;a=commitdiff_plain;h=47b298c6557161ff7e46a778de693268cf9230cc forbid package file paths . and .. --- diff --git a/db.sql b/db.sql index 42eeb06..b1343d0 100644 --- a/db.sql +++ b/db.sql @@ -157,6 +157,7 @@ create table packagefiles ( check (not (filetype = 'h' and target is null)), check (target is null or length(target) between 1 and 4095), check (hash is null or length(hash) between 1 and 1024), + check (path not in ('.', '..')), check (not (filetype = 'r' and hash is null)), check (not (filetype = 'c' and device is null)), check (not (filetype = 'b' and device is null)),