Export to GitHub

bsqlbf-v2 - issue #3

Cookie header format filter won't allow cookies with value 0


Posted on Aug 24, 2012 by Happy Rhino

What steps will reproduce the problem? 1. Try to set a cookie like user_id=0

What is the expected output? What do you see instead?

Expected to be accepted as a valid cookie, instead 'Wrong cookie value' message is shown.

What version of the product are you using? On what operating system?

2.7

Please provide any additional information below.

Problem is with the filter that checks that the right part of the cookie is set. Here's a quick patch that checks for empty strings or undef values but takes 0 as a valid value.

1768c1768

< if ( ! $a || ! $b ) { die "Wrong cookie value. Use -h for help\n"; }

> if ( ! $a || $b eq '' ) { die "Wrong cookie value. Use -h for help\n"; }

Status: New

Labels:
Type-Defect Priority-Medium