This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH gnatsweb.pl wrt to optimization/9086: Missing attachmentfor #9085


> Bugzilla suffers from the same problem.  Once your web browser changes
> from URL, it forgets about file attachments you set in a form (and all
> other values you set in the form), and rightfully so, because of
> security considerations (or at least it should!)

Not all, but at least inputs of type 'file' and 'password'. The other fields
are remembers, for example I don't have to type 'description' all over again
when 'submit' detects a problem with my input

> One thing that could be done about this is providing client-side
> pre-validation of the form when pressing submit (via javascript or such);
> another possibility is making it a two-step submit process, asking the
> user for file attachments _after_ the server decides the rest of the form
> is okay.  Always keeping in mind not every user has javascript, of course.

The 'submit' error I got was 'unknown-id'. The default value has now been
changed to
'net user', which works.

I would set 'Category' to a default 'unknown' value, and report an error if
the user
did not select anything explicitly.

Other than these, what other cases are there that cause 'submit' to fail ?

>
> The third and easiest solution would be adding a field "number of
attachments"
> and having the server-side complain and the user rectify the problem
> if this number is inconsistent with the actual received attachments.  A
simple
> flag "with attachments" might be enough, too.
> I recommend this solution, as it's probably the most robust, and quite
easy to
> implement, too.  Sorry, no patch; I would have no way of testing it.

Problem with this is that it becomes hard for the user to change his mind:
how can he
remove the attachement again? The attachement field appears empty, yet the
server complains since it has hidden state that the user cannot change.

I would personally at least add a warning note to the 'submit error' screen:
Something like
'please note that *any attachements you added must be added again*, since
the browser
forgets them for security reasons' ('any'..'again' in red/bold/whatever)

Jeroen vB


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]