3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-27 01:15:36 +02:00

refuse to post manual content archive with invalid name

This commit is contained in:
Stephen Birarda 2018-02-22 11:41:48 -08:00
parent 07bbb33777
commit 7c5ed86e3e

View file

@ -386,6 +386,12 @@ $(document).ready(function(){
return false;
}
var MANUAL_ARCHIVE_NAME_REGEX = /^[a-zA-Z0-9\\-_ ]+$/;
if (!MANUAL_ARCHIVE_NAME_REGEX.test(inputValue)) {
swal.showInputError("Valid characters include A-z, 0-9, ' ', '_', and '-'.");
return false;
}
// post the provided archive name to ask the server to kick off a manual backup
$.ajax({
type: 'POST',