From d0de561afb1cf7289435e529c006cf318071fa35 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 19 Nov 2009 13:57:12 +0000 Subject: Fix random cookie creation git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@414 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- publish | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'publish') diff --git a/publish b/publish index 05aed4c..2dccb18 100644 --- a/publish +++ b/publish @@ -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 -- cgit v1.2.3