Development
This commit is contained in:
parent
9f81693334
commit
76c7d81466
4 changed files with 33 additions and 5 deletions
|
|
@ -1,7 +1,6 @@
|
|||
from flask import Blueprint, request, redirect, flash
|
||||
from auth import require_level
|
||||
from config_utils import load_core, save_core, verify_core_hash, queued_msg
|
||||
import re
|
||||
import sanitize
|
||||
import validation as validate
|
||||
|
||||
|
|
@ -156,7 +155,11 @@ def dnsblocklists_cardaddblocklist_add():
|
|||
@bp.route('/action/dnsblocklists_cardblocklistrefresh_save', methods=['POST'])
|
||||
@require_level('administrator')
|
||||
def dnsblocklists_cardblocklistrefresh_save():
|
||||
daily_execute_time = sanitize.time_24h(request.form.get('daily_execute_time_24hr_local', ''))
|
||||
daily_execute_time = validate.time_24h(sanitize.time_24h(request.form.get('daily_execute_time_24hr_local', '')))
|
||||
|
||||
if not daily_execute_time:
|
||||
flash('Daily Refresh Time must be a valid 24-hour time (e.g. 02:30).', 'error')
|
||||
return redirect(VIEW)
|
||||
|
||||
if not verify_core_hash(request.form.get('config_hash', '')):
|
||||
flash('Configuration was modified by another session. Please refresh and try again.', 'error')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue