summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xenter_bug.cgi2
-rwxr-xr-xpost_bug.cgi16
2 files changed, 16 insertions, 2 deletions
diff --git a/enter_bug.cgi b/enter_bug.cgi
index 8df634fd2..cd68bfdea 100755
--- a/enter_bug.cgi
+++ b/enter_bug.cgi
@@ -384,7 +384,7 @@ print "
<TR>
<TD ALIGN=RIGHT><B>URL:</B>
<TD COLSPAN=5>
- <INPUT NAME=bug_file_loc SIZE=60 value=\"" .
+ <INPUT NAME=bug_file_loc SIZE=60 value=\"http://" .
value_quote(formvalue('bug_file_loc')) .
"\"></TD>
</TR>
diff --git a/post_bug.cgi b/post_bug.cgi
index 3f933e2d2..a9878ba6a 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -178,7 +178,21 @@ VALUES (
";
foreach my $field (@used_fields) {
- $query .= SqlQuote($::FORM{$field}) . ",\n";
+# fix for 42609. if there is a http:// only in bug_file_loc, strip
+# it out and send an empty value.
+ if ($field eq 'bug_file_loc') {
+ if ($::FORM{$field} eq 'http://') {
+ $::FORM{$field} = "";
+ $query .= SqlQuote($::FORM{$field}) . ",\n";
+ next;
+ }
+ else {
+ $query .= SqlQuote($::FORM{$field}) . ",\n";
+ }
+ }
+ else {
+ $query .= SqlQuote($::FORM{$field}) . ",\n";
+ }
}
my $comment = $::FORM{'comment'};