diff options
author | Peter Palfrader <peter@palfrader.org> | 2009-11-19 13:57:12 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2009-11-19 13:57:12 +0000 |
commit | d0de561afb1cf7289435e529c006cf318071fa35 (patch) | |
tree | ebc8a347eadae68f85eaee52afd9c1bd52ed9e17 /publish | |
parent | e5d8a3cdb428b93f23056342f47cdde240742f69 (diff) |
Fix random cookie creation
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@414 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'publish')
-rw-r--r-- | publish | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -48,12 +48,8 @@ uri_encode() { perl -MURI::Escape -ne 'print uri_escape($_)' } -base64_encode() { - perl -MMIME::Base64 -ne 'print encode_base64($_,'')' -} - get_random() { - head -c 128 /dev/urandom | base64_encode | sed -e 's/[^a-zA-Z0-9]//g' | head -c 16 + head -c 8 /dev/urandom | base64 | tr '/+' '-_' | tr -d '=' } TEST=false |