whitelist alphanumeric characters for cookie_name

should fix #4761
Merge pull request #4762 from minrk/ipv6

whitelist alphanumeric characters for cookie_name