diff options
author | matthew <matthew> | 2008-10-07 16:44:09 +0000 |
---|---|---|
committer | matthew <matthew> | 2008-10-07 16:44:09 +0000 |
commit | deae2f57f9783c7daa5a9b9d8034d8481288f2bb (patch) | |
tree | 0d74c399a4664aa3ef0e05bb9a3eb3352c005038 | |
parent | 8a0d350e7126ed1d88756dcb16256b887bd1244e (diff) |
Use urandom.
-rwxr-xr-x | bin/send-questionnaires | 4 | ||||
-rwxr-xr-x | bin/send-reports | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/bin/send-questionnaires b/bin/send-questionnaires index 70c22bd78..ebd1be8fc 100755 --- a/bin/send-questionnaires +++ b/bin/send-questionnaires @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: send-questionnaires,v 1.7 2008-03-21 14:31:39 matthew Exp $ +# $Id: send-questionnaires,v 1.8 2008-10-07 16:44:09 matthew Exp $ use strict; require 5.8.0; @@ -84,7 +84,7 @@ foreach my $row (@$unsent) { _parameters_ => \%h, To => [ [ $row->{email}, $row->{name} ] ], From => [ $sender, 'FixMyStreet' ], - 'Message-ID' => sprintf('<ques-%s-%s@mysociety.org>', time(), unpack('h*', random_bytes(5))), + 'Message-ID' => sprintf('<ques-%s-%s@mysociety.org>', time(), unpack('h*', random_bytes(5, 1))), }); print "Sending questionnaire $id, problem $row->{id}, token $token to $row->{email}\n" if $verbose; diff --git a/bin/send-reports b/bin/send-reports index 05c63453f..7c87b953d 100755 --- a/bin/send-reports +++ b/bin/send-reports @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: send-reports,v 1.56 2008-09-19 10:24:55 matthew Exp $ +# $Id: send-reports,v 1.57 2008-10-07 16:44:09 matthew Exp $ use strict; require 5.8.0; @@ -171,7 +171,7 @@ If you know of an appropriate contact address, please do get in touch. ]\n\n"; _parameters_ => \%h, To => \@to, From => [ $row->{email}, $row->{name} ], - 'Message-ID' => sprintf('<report-%s-%s@mysociety.org>', time(), unpack('h*', random_bytes(5))), + 'Message-ID' => sprintf('<report-%s-%s@mysociety.org>', time(), unpack('h*', random_bytes(5, 1))), }); my $result; |