Fix issue in validation that would prevent users from specifying month:1:day:2 to have a paste expire 1m2days from submission

This commit is contained in:
Matthew Connelly 2015-04-13 04:09:42 +01:00
parent a59341a12c
commit aa63c16177
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ sub ValidateParams {
return undef unless $params->{code};
return undef unless $params->{title} =~ /^[a-zA-Z0-9\.\-_ @\(\)]{0,255}$/;
return undef unless $params->{lang} =~ /^[a-z0-9\.\-\+# ]{0,40}$/;
return undef unless $params->{expiration} =~ /^([a-z]+:[0-9]+)(,[a-z]+:[0-9]+)*$/ or not $params->{expiration};
return undef unless $params->{expiration} =~ /^([a-z]+:[0-9]+)(:[a-z]+:[0-9]+)*$/ or not $params->{expiration};
return 1;
}
sub GetPaste {