EiffelWebFramework / EWF

Eiffel Web Framework -- Provide a common framework to build easily web server application in Eiffel (portable on various connector and platforms)
http://eiffelweb.projects.eiffel.org/
Other
44 stars 26 forks source link

WSF_REQUEST.cookies_table does not terminate on cookies without a value. #157

Closed julian-tschannen closed 10 years ago

julian-tschannen commented 10 years ago

WSF_REQUEST.cookies_table builds a cookie table by looking through all cookie meta data lines. For each line, it looks for "name=value" pairs by looking for the "=" character. However, if this character does not exist in the line at all the loop does not terminate.

federeghe commented 10 years ago

Also, if the cookie directive ends with extra semicolon (e.g. "Cookie: name=xxxxxx;") the loop never terminates.

jocelyn commented 10 years ago

The reported issues are now fixed in EWF git repository. I am not sure the reported cookies string are valid, but let's be flexible, and accept them. Note that is the string is "Cookie: name=value; foo; name2=value2" there will be 3 values "name" => "value" "foo" => "" "name2" => "value2"

I was not sure what to do with "foo", so I decided to consider it as foo=; i.e empty value.

Don't hesitate to comment, and if the solution does not look correct, please let us know.

Thanks for the reports.