mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 17:22:56 -07:00
Check for valid script extension when using a prefix override
* Also removes php, ruby, and perl overrides
This commit is contained in:
parent
e0e5ac9ecc
commit
8f1360d7c2
1 changed files with 12 additions and 3 deletions
|
@ -2977,7 +2977,12 @@ class SCRIPTS(Notifier):
|
|||
|
||||
self.pythonpath_override = 'nopythonpath'
|
||||
self.pythonpath = True
|
||||
self.prefix_overrides = ('python2', 'python3', 'python', 'pythonw', 'php', 'ruby', 'perl')
|
||||
self.prefix_overrides = {
|
||||
'python': ['.py'],
|
||||
'python2': ['.py'],
|
||||
'python3': ['.py'],
|
||||
'pythonw': ['.py', '.pyw']
|
||||
}
|
||||
self.script_killed = False
|
||||
|
||||
def list_scripts(self):
|
||||
|
@ -3114,10 +3119,14 @@ class SCRIPTS(Notifier):
|
|||
del script_args[0]
|
||||
|
||||
# Allow overrides for shitty systems
|
||||
if prefix and script_args:
|
||||
if script_args[0] in self.prefix_overrides:
|
||||
if prefix and script_args and script_args[0] in self.prefix_overrides:
|
||||
if ext in self.prefix_overrides[script_args[0]]:
|
||||
script[0] = script_args[0]
|
||||
del script_args[0]
|
||||
else:
|
||||
logger.error("Tautulli Notifiers :: Invalid prefix override '%s' for '%s' script, exiting..."
|
||||
% (script_args[0], ext))
|
||||
return
|
||||
|
||||
script.extend(script_args)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue