From 1a7740288554d2268587023dafa39ab284712a8d Mon Sep 17 00:00:00 2001 From: Aga Date: Thu, 1 Aug 2024 11:24:36 +0100 Subject: [PATCH] change timer from Integer to Decimal --- portality/static/js/honeypot.js | 2 +- portality/view/account.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/portality/static/js/honeypot.js b/portality/static/js/honeypot.js index f386905dd..1cd438129 100644 --- a/portality/static/js/honeypot.js +++ b/portality/static/js/honeypot.js @@ -2,7 +2,7 @@ doaj.honeypot = {} doaj.honeypot.init = function () { - console.log("init") + console.log("init"); doaj.honeypot.startTime = performance.now(); $("#submitBtn").on("click", (event) => doaj.honeypot.handleRegistration(event)); } diff --git a/portality/view/account.py b/portality/view/account.py index acf0b7f1a..41261665e 100644 --- a/portality/view/account.py +++ b/portality/view/account.py @@ -3,7 +3,7 @@ from flask import Blueprint, request, url_for, flash, redirect, make_response from flask import render_template, abort from flask_login import login_user, logout_user, current_user, login_required -from wtforms import StringField, HiddenField, PasswordField, IntegerField, validators, Form +from wtforms import StringField, HiddenField, PasswordField, DecimalField, validators, Form from portality import util from portality import constants @@ -318,7 +318,7 @@ class RegisterForm(RedirectForm): roles = StringField('Roles') # These are honeypot (bot-trap) fields email = StringField('email') - hptimer = IntegerField('hptimer') + hptimer = DecimalField('hptimer') def is_bot(self): """