mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 282790: Warn if name for a stored query exceeds maximum length
patch by LpSolit r=mkanat,a=justdave
This commit is contained in:
parent
a86e2f619e
commit
7e595fdc9a
@ -239,6 +239,7 @@ sub InsertNamedQuery ($$$;$) {
|
||||
# Validate the query name.
|
||||
$query_name || ThrowUserError("query_name_missing");
|
||||
$query_name !~ /[<>&]/ || ThrowUserError("illegal_query_name");
|
||||
(length($query_name) <= 64) || ThrowUserError("query_name_too_long");
|
||||
trick_taint($query_name);
|
||||
|
||||
detaint_natural($userid);
|
||||
|
@ -862,6 +862,10 @@
|
||||
[% title = "No Search Name Specified" %]
|
||||
You must enter a name for your search.
|
||||
|
||||
[% ELSIF error == "query_name_too_long" %]
|
||||
[% title = "Query Name Too Long" %]
|
||||
The name of the query must be less than 64 characters long.
|
||||
|
||||
[% ELSIF error == "quips_disabled" %]
|
||||
[% title = "Quips Disabled" %]
|
||||
Quips are disabled.
|
||||
|
Loading…
Reference in New Issue
Block a user