fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-02-28 08:23 am

[dw-free] Use of uninitialized value in weblib.pl

[commit: http://hg.dwscoalition.org/dw-free/rev/fc7366e3aa8d]

http://bugs.dwscoalition.org/show_bug.cgi?id=3519

No warnings when trying to post with an empty subject.

Patch by [staff profile] denise.

Files modified:
  • cgi-bin/weblib.pl
--------------------------------------------------------------------------------
diff -r 1ebe76640790 -r fc7366e3aa8d cgi-bin/weblib.pl
--- a/cgi-bin/weblib.pl	Mon Feb 28 16:17:44 2011 +0800
+++ b/cgi-bin/weblib.pl	Mon Feb 28 16:23:19 2011 +0800
@@ -2305,7 +2305,7 @@ sub entry_form_decode
         $req->{$_} = $POST->{$_};
     }
 
-    if ($POST->{"subject"} eq BML::ml('entryform.subject.hint2')) {
+    if ( $POST->{"subject"} && ( $POST->{"subject"} eq BML::ml( 'entryform.subject.hint2' ) ) ) {
         $req->{"subject"} = "";
     }
 
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org