Skip to content

Commit

Permalink
Merge pull request PanDAWMS#292 from tmaeno/master
Browse files Browse the repository at this point in the history
protection against long job params
  • Loading branch information
tmaeno authored Feb 1, 2024
2 parents 71e2d4d + c9f20f3 commit c219ce0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pandaserver/taskbuffer/JobSpec.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,9 +620,10 @@ def addMultiStepExec(self, steps):
# extract multi step exec
def extractMultiStepExec(self):
try:
ppStr = re.search("(.*)<MULTI_STEP_EXEC>(.+)</MULTI_STEP_EXEC>", self.jobParameters)
if ppStr is not None:
return ppStr.group(1), json.loads(ppStr.group(2))
if "<MULTI_STEP_EXEC>" in self.jobParameters and "</MULTI_STEP_EXEC>" in self.jobParameters:
pp_1, pp_2 = self.jobParameters.split("<MULTI_STEP_EXEC>")
pp_2 = pp_2.split("</MULTI_STEP_EXEC>")[0]
return pp_1, json.loads(pp_2)
except Exception:
pass
return self.jobParameters, None
Expand Down

0 comments on commit c219ce0

Please sign in to comment.