Author: humbedooh
Date: Fri Mar 20 23:57:21 2015
New Revision: 1668179
URL: http://svn.apache.org/r1668179
Log:
- fix wording on stv page
- add cryptohash to email receipt for now:
- Having this hash without machine access is useless
- Having this hash with machine info is useless without the voter ID (which
is not saved on the server)
- In case of suspicion of tampering with vote data, the hash + voter ID +
server access can be used to verify that a vote was saved correctly. Without
all three pieces, you cannot use it.
Modified:
steve/trunk/pytest/www/cgi-bin/rest_voter.py
steve/trunk/pytest/www/htdocs/ballot_stv.html
Modified: steve/trunk/pytest/www/cgi-bin/rest_voter.py
URL:
http://svn.apache.org/viewvc/steve/trunk/pytest/www/cgi-bin/rest_voter.py?rev=1668179&r1=1668178&r2=1668179&view=diff
==============================================================================
--- steve/trunk/pytest/www/cgi-bin/rest_voter.py (original)
+++ steve/trunk/pytest/www/cgi-bin/rest_voter.py Fri Mar 20 23:57:21 2015
@@ -170,7 +170,8 @@ if pathinfo:
with open(issuepath + ".votes", "w") as f:
f.write(json.dumps(votes))
f.close()
- voter.email(email, "Vote registered: %s (%s)" %
(issue, issuedata['title']), "This is a receipt that your vote was registered
for issue #%s:\n\nElection: %s (%s)\nIssue: %s (%s)" % (issue,
basedata['title'], election, issuedata['title'], issue))
+ votehash = hashlib.sha224(basedata['hash'] +
voterid + vote).hexdigest()
+ voter.email(email, "Vote registered: %s (%s)" %
(issue, issuedata['title']), "This is a receipt that your vote was registered
for issue #%s:\n\nElection: %s (%s)\nIssue: %s (%s)\nVote cryptohash: %s" %
(issue, basedata['title'], election, issuedata['title'], issue, votehash))
response.respond(200, {'message': 'Vote saved!'})
else:
Modified: steve/trunk/pytest/www/htdocs/ballot_stv.html
URL:
http://svn.apache.org/viewvc/steve/trunk/pytest/www/htdocs/ballot_stv.html?rev=1668179&r1=1668178&r2=1668179&view=diff
==============================================================================
--- steve/trunk/pytest/www/htdocs/ballot_stv.html (original)
+++ steve/trunk/pytest/www/htdocs/ballot_stv.html Fri Mar 20 23:57:21 2015
@@ -18,7 +18,7 @@
<div class="formbox" id="votebox">
<h2 id="title"></h2>
<p>
- This is a ballot with <span id="cnum">N</span> nominated members and
+ This is a ballot with <span id="cnum">N</span> candidates and
<span id="snum">N</span> board seats available.
The red line denotes the cutaway, should all your choices be voted in.
All the nominees are placed in random order on the canidate list.