Fix in regular expression for modern python

This commit is contained in:
Antonio de la Rosa 2025-10-26 00:01:08 +02:00
parent aff9bad483
commit d94cb59af8

View file

@ -43,7 +43,7 @@ class WebAppTask(Task):
return False
if self.data['path']!='/' and not re.match('^/[\w.-]*/$', self.data['path'].strip()):
if self.data['path']!='/' and not re.match(r'^/[\w.-]*/$', self.data['path'].strip()):
self.logtask.insert({'status':1, 'progress': 100, 'error': 1, 'task_id': self.id, 'server': self.server, 'message': 'Error: format wrong for path, you need this format / or /path/ '+self.data['path']})
return False