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:
parent
07bbb33777
commit
7c5ed86e3e
1 changed files with 6 additions and 0 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue