Summary: | [webkit-gtk] Wrong handling of file upload if no file selected | ||
---|---|---|---|
Product: | WebKit | Reporter: | Stephan Haller <nomad> |
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | gustavo, jmalonzo |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Other | ||
OS: | Linux | ||
URL: | http://forum.gmc-clan.de | ||
Attachments: |
Description
Stephan Haller
2009-05-08 12:07:29 PDT
Created attachment 30134 [details]
PHP script to test file upload in form
Created attachment 30135 [details]
Patch against WebKit-GTK 1.1.6 for correct handling of file uploads in form
(In reply to comment #2) > Created an attachment (id=30135) [review] > Patch against WebKit-GTK 1.1.6 for correct handling of file uploads in form > Hi Stephen. Thanks for the patch. This patch requires a ChangeLog (see http://webkit.org/coding/contributing.html for more info). I'm also downgrading the priority to P2 since this defect is not immediate (i.e., not a high-priority crasher). Created attachment 30239 [details]
Patch against WebKit-GTK 1.1.6 for correct handling of file uploads in form
Corrected patch file - added Changelog
You should set the review flag to ? to get a patch reviewed. I see a few issues with the patch that should be addressed: 1) It would be clearer to be structured to have an early-return 2) It uses tabs for indentation instead of spaces 3) A return statements has redundant parentheses. 4) There should be a space after "if" and before the parenthesis. Created attachment 30244 [details]
Patch against WebKit-GTK 1.1.6 for correct handling of file uploads in form
Restructured to have an early return, tried to follow code guidelines ;)
Comment on attachment 30244 [details] Patch against WebKit-GTK 1.1.6 for correct handling of file uploads in form > + if (pathName.isEmpty()) > + return path; > + This is wrong. There's no 'path' in this context, it seems. Created attachment 30259 [details]
Patch against WebKit-GTK 1.1.6 for correct handling of file uploads in form
Oops, sorry. Yes, it wasn't. Corrected and recompiled successfully. I hope I haven't made more mistakes in just these few lines :(
Comment on attachment 30259 [details]
Patch against WebKit-GTK 1.1.6 for correct handling of file uploads in form
Looks good now =).
(In reply to comment #9) > (From update of attachment 30259 [details] [review]) > Looks good now =). > Except that you patched the wrong ChangeLog file, and had trailing spaces at the end of some sentences. Use ./WebKitTools/Scripts/prepare-ChangeLog next time =). (In reply to comment #10) > (In reply to comment #9) > > (From update of attachment 30259 [details] [review] [review]) > > Looks good now =). > > > > Except that you patched the wrong ChangeLog file, and had trailing spaces at > the end of some sentences. Use ./WebKitTools/Scripts/prepare-ChangeLog next > time =). Also, you had an additional space before the return. The indentation is 4 spaces, not 5 =). I fixed those and landed the patch as r43649. Thanks. |