Add check for backupId to start with "box"
This commit is contained in:
@@ -172,6 +172,13 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
|
||||
return;
|
||||
}
|
||||
|
||||
if ($scope.backupId.indexOf('box') !== 0) {
|
||||
$scope.error.generic = 'Backup id must start with "box"';
|
||||
$scope.error.backupId = true;
|
||||
$scope.busy = false;
|
||||
return;
|
||||
}
|
||||
|
||||
var version = $scope.backupId.match(/_v(\d+.\d+.\d+)/);
|
||||
if (!version) {
|
||||
$scope.error.generic = 'Backup id is missing version information';
|
||||
|
||||
Reference in New Issue
Block a user