diff options
Diffstat (limited to 'web')
-rwxr-xr-x | web/contact.cgi | 6 | ||||
-rwxr-xr-x | web/flickr.cgi | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/web/contact.cgi b/web/contact.cgi index 4a0a03bd4..67c19b081 100755 --- a/web/contact.cgi +++ b/web/contact.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: contact.cgi,v 1.23 2007-08-29 23:03:16 matthew Exp $ +# $Id: contact.cgi,v 1.24 2007-10-22 18:00:04 matthew Exp $ use strict; use Standard; @@ -14,6 +14,7 @@ use CrossSell; use mySociety::Email; use mySociety::EmailUtil; use mySociety::Web qw(ent); +use mySociety::Random qw(random_bytes); # Main code for index.cgi sub main { @@ -60,7 +61,8 @@ sub contact_submit { _body_ => "$message\n\n$postfix", From => [$input{email}, $input{name}], To => [[mySociety::Config::get('CONTACT_EMAIL'), 'FixMyStreet']], - Subject => 'FMS message: ' . $subject + Subject => 'FMS message: ' . $subject, + 'Message-ID' => sprintf('<contact-%s-%s@mysociety.org>', time(), unpack('h*', random_bytes(5))), }); my $result = mySociety::EmailUtil::send_email($email, $input{email}, mySociety::Config::get('CONTACT_EMAIL')); if ($result == mySociety::EmailUtil::EMAIL_SUCCESS) { diff --git a/web/flickr.cgi b/web/flickr.cgi index ac0e83d78..32b51bd7a 100755 --- a/web/flickr.cgi +++ b/web/flickr.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: flickr.cgi,v 1.5 2007-08-29 23:03:16 matthew Exp $ +# $Id: flickr.cgi,v 1.6 2007-10-22 18:00:04 matthew Exp $ use strict; use Standard; @@ -14,6 +14,7 @@ use LWP::Simple; use mySociety::AuthToken; use mySociety::Email; use mySociety::EmailUtil; +use mySociety::Random qw(random_bytes); sub main { my $q = shift; @@ -29,7 +30,7 @@ sub main { $url = 'http://api.flickr.com/services/rest/?method=flickr.people.getInfo&api_key='.$key.'&user_id='.$nsid; $result = get($url); my ($name) = $result =~ /<realname>(.*?)<\/realname>/; - $name ||= ''; + $name ||= ''; my $id = dbh()->selectrow_array("select nextval('flickr_id_seq');"); dbh()->do("insert into flickr (id, nsid, name, email) values (?, ?, ?, ?)", {}, @@ -56,6 +57,7 @@ EOF _parameters_ => \%h, To => $email, From => [ mySociety::Config::get('CONTACT_EMAIL'), 'FixMyStreet' ], + 'Message-ID' => sprintf('<flickr-%s-%s@mysociety.org>', time(), unpack('h*', random_bytes(5))), }); my $result; |