Require a browser fingerprint if requested (do not fail gracefully)
This commit is contained in:
parent
b6c0170748
commit
ca084d3207
@ -48,16 +48,11 @@
|
||||
// String.prototype.join confuses fingerprintjs2
|
||||
var strjoin = String.prototype.join;
|
||||
String.prototype.join = undefined;
|
||||
try {
|
||||
new Fingerprint2().get(function(result, components) {
|
||||
String.prototype.join = strjoin;
|
||||
booth.fingerprint = components;
|
||||
nextTemplate();
|
||||
});
|
||||
} catch (ex) {
|
||||
console.error(ex);
|
||||
nextTemplate();
|
||||
}
|
||||
} else {
|
||||
nextTemplate();
|
||||
}
|
||||
|
@ -67,6 +67,14 @@
|
||||
resetBooth();
|
||||
|
||||
function loadElection() {
|
||||
// Verify booth
|
||||
if (should_do_fingerprint) {
|
||||
if (typeof Fingerprint2 === 'undefined') {
|
||||
boothError('Your browser did not load fingerprintj2 correctly. Please try again after disabling your ad blockers and similar software. If the issue persists, try using a different browser.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({ url: "{{ url_for('election_api_json', election_id=election._id) }}", dataType: "text" })
|
||||
.done(function(data) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user