mirror of
https://github.com/swizzin/swizzin_dashboard.git
synced 2024-09-20 14:56:08 +08:00
Fix potential username collisions when checking app status
This commit is contained in:
parent
376d60a453
commit
16c4197122
|
@ -135,7 +135,8 @@ def apps_status(username):
|
|||
def is_process_running(procs, username, application):
|
||||
result = False
|
||||
for p in procs:
|
||||
if username.lower() in str(p).lower():
|
||||
p = p.decode('utf-8').split()
|
||||
if username.lower() == str(p[0]).lower():
|
||||
if application.lower() in str(p).lower():
|
||||
result = True
|
||||
return result
|
||||
|
|
Loading…
Reference in a new issue