Skip to content

Commit

Permalink
webui: fix invalid url generated in first job
Browse files Browse the repository at this point in the history
Fixes #974: Submitting job jumps to invalid site
  • Loading branch information
[Aron Schueler] authored and franku committed Oct 11, 2018
1 parent 83b9740 commit f665aea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webui/module/Job/src/Job/Controller/JobController.php
Expand Up @@ -361,7 +361,8 @@ public function runAction()
$this->bsock->disconnect();
$s = strrpos($result, "=") + 1;
$jobid = rtrim( substr( $result, $s ) );
return $this->redirect()->toRoute('job', array('action' => 'details', 'id' => $jobid));
preg_match("'\d{1,99}(?=%)?'", $jobid, $filtered);
return $this->redirect()->toRoute('job', array('action' => 'details', 'id' => $filtered[0]));
}
catch(Exception $e) {
echo $e->getMessage();
Expand Down

0 comments on commit f665aea

Please sign in to comment.