CHAT_OUTPUT_BEGIN
COMMAND_ID=SUPPORT-260918-GRAM-SUPPORT-SERVICE-WORKER-EXACT-SOURCE-READONLY-516R5RCA5
STATUS=OK
RC=0
HOST=pve01
MODE=read-only
COMPONENT=gram-support-service-worker-exact-source-readonly
REFERENCE_REGISTER_CHECK=OK
REFERENCE_SHA256=5a3d8e5154c41cb582a4e0aca68090be1f0138918bf82131a948df326f9d8d66
ERROR_REGISTER_CHECK=OK
ERROR_REGISTER_SHA256=3b09a553ec0f527ed3afeed4753f52a74ee3036045bbfb3c685e9f8af4ba7ba0
COMMAND_SHA256=379bcbf1f6a2973b06547d9db50a4fd99e2617ee053737afc1e5ce6db9d550f9
DUPLICATE_FAILED_COMMAND_BLOCKED=false
EXECUTION_STARTED=true
CHANGE_DECLARED=false
RESULT_CONTRACT_VALID=true
RESULT_CONTRACT_STATUS=NOT_APPLICABLE
RESULT_CONTRACT_ERROR=NONE
COMMAND_RC=0
CHANGES_MADE=false
ROLLBACK_STARTED=false
ROLLBACK_RESTORED=null
MUTATION_OUTCOME=NO_MUTATION
SANITIZED=yes
SECRETS_INCLUDED=no
PRIVATE_ADDRESSES_INCLUDED=no
RAW_EVIDENCE_SHA256=ff422d1ff9a452d5fef336f20c19e5b81593633cfc1a2dcf4669d836025ea6f6
SANITIZED_OUTPUT_SHA256=ff422d1ff9a452d5fef336f20c19e5b81593633cfc1a2dcf4669d836025ea6f6
OUTPUT_BEGIN
GRAM516R5RCA5_SAFE_REPORT={"err_truncated":false,"guest":{"core":[{"matches":[{"sep":true},{"line":1,"text":"<?php"},{"line":2,"text":""},{"line":3,"text":"namespace XF\\Mvc;"},{"line":4,"text":""},{"line":5,"text":"use XF\\Http\\Response;"},{"line":6,"text":"use XF\\Mvc\\Renderer\\AbstractRenderer;"},{"line":7,"text":"use XF\\Util\\File;"},{"line":8,"text":"use XF\\Util\\Xml;"},{"line":9,"text":""},{"line":10,"text":"use function get_class;"},{"line":11,"text":""},{"line":12,"text":"class View"},{"line":13,"text":"{"},{"line":14,"text":"\t/**"},{"line":15,"text":"\t * @var AbstractRenderer"},{"line":16,"text":"\t */"},{"line":17,"text":"\tprotected $renderer;"}],"path":"src/XF/Mvc/View.php","present":true,"sha256":"864b699008315fa5f341b2e6ce9744c3fdd5f0ef1e312921bea53d56722e7547"},{"matches":[{"sep":true},{"line":1,"text":"<?php"},{"line":2,"text":""},{"line":3,"text":"namespace XF\\Mvc\\Renderer;"},{"line":4,"text":""},{"line":5,"text":"use XF\\Http\\Response;"},{"line":6,"text":"use XF\\Mvc\\Reply\\AbstractReply;"},{"line":7,"text":"use XF\\Mvc\\View;"},{"line":8,"text":"use XF\\Template\\Template;"},{"line":9,"text":"use XF\\Template\\Templater;"},{"line":10,"text":""},{"line":11,"text":"abstract class AbstractRenderer"},{"line":12,"text":"{"},{"line":13,"text":"\t/**"},{"line":14,"text":"\t * @var callable"},{"line":15,"text":"\t */"},{"line":16,"text":"\tprotected $viewFactory;"},{"line":17,"text":""},{"sep":true},{"line":42,"text":""},{"line":43,"text":"\tprotected function addDefaultExtraHeaders(Response $response)"},{"line":44,"text":"\t{"},{"line":45,"text":"\t\t$response->header('X-Content-Type-Options', 'nosniff');"},{"line":46,"text":""},{"line":47,"text":"\t\tif (\\XF::app()->config('enableClickjackingProtection'))"},{"line":48,"text":"\t\t{"},{"line":49,"text":"\t\t\t$response->header('X-Frame-Options', 'SAMEORIGIN');"},{"line":50,"text":"\t\t}"},{"line":51,"text":"\t}"},{"line":52,"text":""},{"line":53,"text":"\tabstract protected function initialize();"},{"line":54,"text":"\tabstract public function getResponseType();"},{"line":55,"text":"\tabstract public function renderRedirect($url, $type, $message = '');"},{"line":56,"text":"\tabstract public function renderMessage($message);"},{"line":57,"text":"\tabstract public function renderErrors(array $errors);"},{"line":58,"text":"\tabstract public function renderView($viewName, $templateName, array $params = []);"},{"line":59,"text":""},{"line":60,"text":"\tpublic function setReply(AbstractReply $reply)"},{"line":61,"text":"\t{"},{"line":62,"text":"\t\t$this->reply = $reply;"},{"line":63,"text":"\t}"},{"line":64,"text":""},{"line":65,"text":"\tpublic function renderUnrepresentable()"},{"line":66,"text":"\t{"},{"line":67,"text":"\t\treturn $this->renderErrors(['This page is not representable in the requested type.']);"},{"line":68,"text":"\t}"},{"line":69,"text":""},{"line":70,"text":"\t/**"},{"sep":true},{"line":73,"text":"\t * @param array $params"},{"line":74,"text":"\t *"},{"line":75,"text":"\t * @return View"},{"line":76,"text":"\t */"},{"line":77,"text":"\tpublic function createViewObject($viewName, $templateName, array $params = [])"},{"line":78,"text":"\t{"},{"line":79,"text":"\t\t$f = $this->viewFactory;"},{"line":80,"text":"\t\treturn $f($viewName, ["},{"line":81,"text":"\t\t\t$this, $this->response, $templateName, $params,"},{"line":82,"text":"\t\t]);"},{"line":83,"text":"\t}"},{"line":84,"text":""},{"line":85,"text":"\tpublic function renderViewObject($viewName, &$templateName, array &$params = [], $responseType = null)"},{"line":86,"text":"\t{"},{"line":87,"text":"\t\t$responseType = $responseType ?: $this->getResponseType();"},{"line":88,"text":"\t\t$view = $this->createViewObject($viewName, $templateName, $params);"},{"line":89,"text":"\t\t$method = 'render' . ucfirst($responseType);"},{"line":90,"text":"\t\tif ($view && method_exists($view, $method))"},{"line":91,"text":"\t\t{"},{"line":92,"text":"\t\t\t$result = $view->$method();"},{"line":93,"text":"\t\t}"},{"line":94,"text":"\t\telse"},{"line":95,"text":"\t\t{"},{"line":96,"text":"\t\t\t$result = null;"},{"line":97,"text":"\t\t}"},{"line":98,"text":""},{"line":99,"text":"\t\tif ($view)"},{"line":100,"text":"\t\t{"},{"line":101,"text":"\t\t\t$templateName = $view->getTemplateName();"}],"path":"src/XF/Mvc/Renderer/AbstractRenderer.php","present":true,"sha256":"22f0ba6cb78fcbead8ac19cd24f2be211ff6eb1059a343513e0e85c12b72ac9e"},{"matches":[{"sep":true},{"line":5,"text":"use XF\\Mvc\\Reply\\AbstractReply;"},{"line":6,"text":"use XF\\Util\\File;"},{"line":7,"text":""},{"line":8,"text":"use function count, strval;"},{"line":9,"text":""},{"line":10,"text":"class Html extends AbstractRenderer"},{"line":11,"text":"{"},{"line":12,"text":"\tprotected function initialize()"},{"line":13,"text":"\t{"},{"line":14,"text":"\t\t$this->response->contentType('text/html');"},{"line":15,"text":"\t}"},{"line":16,"text":""},{"line":17,"text":"\tpublic function getResponseType()"},{"line":18,"text":"\t{"},{"line":19,"text":"\t\treturn 'html';"},{"line":20,"text":"\t}"},{"line":21,"text":""},{"line":22,"text":"\tpublic function renderRedirect($url, $type, $message = '')"},{"line":23,"text":"\t{"},{"line":24,"text":"\t\t$this->setResponseCode($type == 'permanent' ? 301 : 303);"},{"line":25,"text":"\t\t$this->response->header('Location', $url);"},{"line":26,"text":"\t}"},{"line":27,"text":""},{"line":28,"text":"\tpublic function renderMessage($message)"},{"line":29,"text":"\t{"},{"line":30,"text":"\t\t$app = \\XF::app();"},{"line":31,"text":"\t\treturn $this->renderView('XF:MessagePage', $app['app.defaultType'] . ':message_page', ["},{"line":32,"text":"\t\t\t'message' => $message,"},{"line":33,"text":"\t\t]);"},{"line":34,"text":"\t}"},{"line":35,"text":""},{"line":36,"text":"\tpublic function renderErrors(array $errors)"},{"line":37,"text":"\t{"},{"line":38,"text":"\t\t$app = \\XF::app();"},{"line":39,"text":"\t\treturn $this->renderView('XF:Error', $app['app.defaultType'] . ':error', ["},{"line":40,"text":"\t\t\t'errors' => $errors,"},{"line":41,"text":"\t\t\t'error' => count($errors) == 1 ? reset($errors) : false,"},{"line":42,"text":"\t\t]);"},{"line":43,"text":"\t}"},{"line":44,"text":""},{"line":45,"text":"\tpublic function renderView($viewName, $templateName, array $params = [])"},{"line":46,"text":"\t{"},{"line":47,"text":"\t\t$output = $this->renderViewObject($viewName, $templateName, $params);"},{"line":48,"text":"\t\tif ($output === null && $templateName)"},{"line":49,"text":"\t\t{"},{"line":50,"text":"\t\t\t$output = $this->getTemplate($templateName, $params)->render();"},{"line":51,"text":"\t\t}"},{"line":52,"text":"\t\treturn $output;"},{"line":53,"text":"\t}"},{"line":54,"text":""},{"line":55,"text":"\tpublic function postFilter($content, AbstractReply $reply)"},{"line":56,"text":"\t{"},{"line":57,"text":"\t\t$content = strval($content);"}],"path":"src/XF/Mvc/Renderer/Html.php","present":true,"sha256":"beec569b9d8feb92998678acf018aa7a7fe19c3db7ff986de7010c03aeb146b7"},{"matches":[{"sep":true},{"line":7,"text":""},{"line":8,"text":"use function array_key_exists, count, is_array, is_object, strval;"},{"line":9,"text":""},{"line":10,"text":"class Json extends AbstractRenderer"},{"line":11,"text":"{"},{"line":12,"text":"\tprotected $encodeModifiers = JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT;"},{"line":13,"text":""},{"line":14,"text":"\tprotected function initialize()"},{"line":15,"text":"\t{"},{"line":16,"text":"\t\t$this->response->contentType('application/json');"},{"line":17,"text":"\t}"},{"line":18,"text":""},{"line":19,"text":"\tpublic function getResponseType()"},{"line":20,"text":"\t{"},{"line":21,"text":"\t\treturn 'json';"},{"line":22,"text":"\t}"},{"line":23,"text":""},{"line":24,"text":"\tpublic function renderRedirect($url, $type, $message = '')"},{"line":25,"text":"\t{"},{"line":26,"text":"\t\treturn ["},{"line":27,"text":"\t\t\t'status' => 'ok',"},{"line":28,"text":"\t\t\t'message' => $message,"},{"line":29,"text":"\t\t\t'redirect' => $url,"},{"line":30,"text":"\t\t];"},{"line":31,"text":"\t}"},{"sep":true},{"line":46,"text":"\t\t\t'error' => count($errors) == 1 ? reset($errors) : false,"},{"line":47,"text":"\t\t\t'forJson' => true,"},{"line":48,"text":"\t\t];"},{"line":49,"text":"\t\t$html = $this->getTemplate($app['app.defaultType'] . ':error', $params)->render();"},{"line":50,"text":""},{"line":51,"text":"\t\treturn ["},{"line":52,"text":"\t\t\t'status' => 'error',"},{"line":53,"text":"\t\t\t'errors' => $errors,"},{"line":54,"text":"\t\t\t'errorHtml' => $this->getHtmlOutputStructure($html),"},{"line":55,"text":"\t\t];"},{"line":56,"text":"\t}"},{"line":57,"text":""},{"line":58,"text":"\tpublic function renderView($viewName, $templateName, array $params = [])"},{"line":59,"text":"\t{"},{"line":60,"text":"\t\tif (isset($params['innerContent']))"},{"line":61,"text":"\t\t{"},{"line":62,"text":"\t\t\treturn $params['innerContent'];"},{"line":63,"text":"\t\t}"},{"line":64,"text":""},{"line":65,"text":"\t\t$output = $this->renderViewObject($viewName, $templateName, $params);"},{"line":66,"text":"\t\tif ($output === null)"},{"line":67,"text":"\t\t{"},{"line":68,"text":"\t\t\t$output = ["},{"line":69,"text":"\t\t\t\t'status' => 'ok',"},{"line":70,"text":"\t\t\t\t'html' => $this->renderHtmlFallback($viewName, $templateName, $params),"},{"line":71,"text":"\t\t\t];"},{"line":72,"text":"\t\t}"},{"line":73,"text":"\t\telse if (is_array($output) && array_key_exists('html', $output) && $output['html'] === null)"},{"line":74,"text":"\t\t{"},{"line":75,"text":"\t\t\t$output['html'] = $this->renderHtmlFallback($viewName, $templateName, $params);"},{"line":76,"text":"\t\t}"},{"line":77,"text":""},{"line":78,"text":"\t\treturn $output;"},{"line":79,"text":"\t}"},{"line":80,"text":""},{"line":81,"text":"\tpublic function renderHtmlFallback($viewName, $templateName, array $params = [])"},{"line":82,"text":"\t{"},{"line":83,"text":"\t\t$htmlOutput = $this->renderViewObject($viewName, $templateName, $params, 'html');"},{"line":84,"text":"\t\tif ($htmlOutput === null && $templateName)"},{"line":85,"text":"\t\t{"},{"line":86,"text":"\t\t\t$htmlOutput = $this->getTemplate($templateName, $params)->render();"},{"line":87,"text":"\t\t}"},{"line":88,"text":""},{"line":89,"text":"\t\treturn $this->getHtmlOutputStructure($htmlOutput);"},{"line":90,"text":"\t}"},{"line":91,"text":""},{"line":92,"text":"\tpublic function getHtmlOutputStructure($html)"},{"line":93,"text":"\t{"}],"path":"src/XF/Mvc/Renderer/Json.php","present":true,"sha256":"2f3c46b7ef35aaceddf6c358dda1d53826ef7af886051487f3be9bfba0bd5f96"},{"matches":[{"sep":true},{"line":1,"text":"<?php"},{"line":2,"text":""},{"line":3,"text":"namespace XF\\Mvc\\Renderer;"},{"line":4,"text":""},{"line":5,"text":"class Raw extends AbstractRenderer"},{"line":6,"text":"{"},{"line":7,"text":"\tprotected function initialize()"},{"line":8,"text":"\t{"},{"line":9,"text":"\t}"},{"line":10,"text":""},{"line":11,"text":"\tpublic function getResponseType()"},{"line":12,"text":"\t{"},{"line":13,"text":"\t\treturn 'raw';"},{"line":14,"text":"\t}"},{"line":15,"text":""},{"line":16,"text":"\tpublic function renderRedirect($url, $type, $message = '')"},{"line":17,"text":"\t{"},{"line":18,"text":"\t\t$this->setResponseCode($type == 'permanent' ? 301 : 303);"},{"line":19,"text":"\t\t$this->response->header('Location', $url);"},{"line":20,"text":"\t}"},{"line":21,"text":""},{"line":22,"text":"\tpublic function renderMessage($message)"},{"line":23,"text":"\t{"},{"line":24,"text":"\t\treturn '';"},{"line":25,"text":"\t}"},{"line":26,"text":""},{"line":27,"text":"\tpublic function renderErrors(array $errors)"},{"line":28,"text":"\t{"},{"line":29,"text":"\t\treturn '';"},{"line":30,"text":"\t}"},{"line":31,"text":""},{"line":32,"text":"\tpublic function renderView($viewName, $templateName, array $params = [])"},{"line":33,"text":"\t{"},{"line":34,"text":"\t\tif (isset($params['innerContent']))"},{"line":35,"text":"\t\t{"},{"line":36,"text":"\t\t\treturn $params['innerContent'];"},{"line":37,"text":"\t\t}"},{"line":38,"text":""},{"line":39,"text":"\t\t$output = $this->renderViewObject($viewName, $templateName, $params);"},{"line":40,"text":"\t\tif ($output === null)"},{"line":41,"text":"\t\t{"},{"line":42,"text":"\t\t\t$output = '';"},{"line":43,"text":"\t\t}"},{"line":44,"text":"\t\treturn $output;"}],"path":"src/XF/Mvc/Renderer/Raw.php","present":true,"sha256":"46592f40912a491fe76e3ebb2308c77b55db9bc5b3f231f3e3b47c0dacf58e29"},{"matches":[],"path":"src/XF/Mvc/Reply/View.php","present":true,"sha256":"c4a3a6fcd36b056428ab1bc569857ba3757df53548b648301d5cb6271817662e"},{"matches":[{"sep":true},{"line":53,"text":"\t\t}"},{"line":54,"text":""},{"line":55,"text":"\t\t$match = $this->route($routePath);"},{"line":56,"text":""},{"line":57,"text":"\t\t$earlyResponse = $this->beforeDispatch($match);"},{"line":58,"text":"\t\tif ($earlyResponse)"},{"line":59,"text":"\t\t{"},{"line":60,"text":"\t\t\treturn $earlyResponse;"},{"line":61,"text":"\t\t}"},{"line":62,"text":""},{"line":63,"text":"\t\t$reply = $this->dispatchLoop($match);"},{"line":64,"text":""},{"line":65,"text":"\t\t$responseType = $reply->getResponseType() ?: $match->getResponseType();"},{"line":66,"text":"\t\t$response = $this->render($reply, $responseType);"},{"line":67,"text":""},{"line":68,"text":"\t\treturn $response;"},{"line":69,"text":"\t}"},{"line":70,"text":""},{"line":71,"text":"\tpublic function route($routePath)"},{"line":72,"text":"\t{"},{"line":73,"text":"\t\t$match = $this->getRouter()->routeToController($routePath, $this->request);"},{"line":74,"text":""},{"line":75,"text":"\t\tif (!($match instanceof RouteMatch) || !$match->getController())"},{"line":76,"text":"\t\t{"},{"line":77,"text":"\t\t\t$match = $this->app->getErrorRoute('DispatchError', ["},{"line":78,"text":"\t\t\t\t'code' => 'invalid_route',"},{"sep":true},{"line":102,"text":"\t{"},{"line":103,"text":"\t\t$i = 1;"},{"line":104,"text":"\t\t$attemptErrorReroute = true;"},{"line":105,"text":"\t\t$originalMatch = $match;"},{"line":106,"text":"\t\t$reply = null;"},{"line":107,"text":""},{"line":108,"text":"\t\t$this->app->fire($this->eventPrefix . '_match', [$this, &$match]);"},{"line":109,"text":""},{"line":110,"text":"\t\tdo"},{"line":111,"text":"\t\t{"},{"line":112,"text":"\t\t\t$controllerClass = $match->getController();"},{"line":113,"text":"\t\t\t$action = $match->getAction();"},{"line":114,"text":"\t\t\t$responseType = $match->getResponseType();"},{"line":115,"text":"\t\t\t$sectionContext = $match->getSectionContext();"},{"line":116,"text":"\t\t\t$params = $match->getParameterBag();"},{"line":117,"text":"\t\t\t$controller = null;"},{"line":118,"text":""},{"line":119,"text":"\t\t\ttry"},{"line":120,"text":"\t\t\t{"},{"line":121,"text":"\t\t\t\t$reply = $this->dispatchFromMatch($match, $controller, $reply);"},{"line":122,"text":"\t\t\t}"},{"line":123,"text":"\t\t\tcatch (\\Throwable $e)"},{"line":124,"text":"\t\t\t{"},{"line":125,"text":"\t\t\t\t$reply = $this->handleControllerError($e, $attemptErrorReroute, $controller, ["},{"line":126,"text":"\t\t\t\t\t'responseType' => $responseType,"},{"line":127,"text":"\t\t\t\t\t'sectionContext' => $sectionContext,"},{"line":128,"text":"\t\t\t\t\t'action' => $action,"},{"line":129,"text":"\t\t\t\t\t'params' => $params,"},{"line":130,"text":"\t\t\t\t]);"},{"line":131,"text":"\t\t\t\t$attemptErrorReroute = false;"},{"line":132,"text":"\t\t\t}"},{"line":133,"text":"\t\t\tcatch (\\Exception $e)"},{"line":134,"text":"\t\t\t{"},{"line":135,"text":"\t\t\t\t// this will only be hit in PHP 5.x"},{"line":136,"text":"\t\t\t\t$reply = $this->handleControllerError($e, $attemptErrorReroute, $controller, ["},{"line":137,"text":"\t\t\t\t\t'responseType' => $responseType,"},{"line":138,"text":"\t\t\t\t\t'sectionContext' => $sectionContext,"},{"line":139,"text":"\t\t\t\t\t'action' => $action,"},{"line":140,"text":"\t\t\t\t\t'params' => $params,"},{"line":141,"text":"\t\t\t\t]);"},{"line":142,"text":"\t\t\t\t$attemptErrorReroute = false;"},{"line":143,"text":"\t\t\t}"},{"line":144,"text":""},{"line":145,"text":"\t\t\tif (!$reply instanceof AbstractReply)"},{"line":146,"text":"\t\t\t{"},{"line":147,"text":"\t\t\t\t$reply = new Reroute("},{"line":148,"text":"\t\t\t\t\t$this->app->getErrorRoute('DispatchError', ["},{"line":149,"text":"\t\t\t\t\t\t'code' => 'no_reply',"},{"line":150,"text":"\t\t\t\t\t\t'controller' => $controllerClass,"},{"line":151,"text":"\t\t\t\t\t\t'action' => $action,"},{"line":152,"text":"\t\t\t\t\t], $responseType)"},{"line":153,"text":"\t\t\t\t);"},{"line":154,"text":"\t\t\t\t$reply->setSectionContext($sectionContext);"},{"line":155,"text":"\t\t\t}"},{"line":156,"text":""},{"line":157,"text":"\t\t\tif (!($reply instanceof Reroute) && $attemptErrorReroute)"},{"line":158,"text":"\t\t\t{"},{"line":159,"text":"\t\t\t\t// if we might be debugging, move this up so that we can display an error instead of the page results."},{"line":160,"text":"\t\t\t\t// not doing this can hide errors"},{"line":161,"text":""},{"line":162,"text":"\t\t\t\ttry"},{"line":163,"text":"\t\t\t\t{"},{"line":164,"text":"\t\t\t\t\t\\XF::triggerRunOnce(true);"},{"line":165,"text":"\t\t\t\t}"},{"line":166,"text":"\t\t\t\tcatch (\\Throwable $e)"},{"line":167,"text":"\t\t\t\t{"},{"line":168,"text":"\t\t\t\t\t$attemptErrorReroute = false;"},{"line":169,"text":""},{"line":170,"text":"\t\t\t\t\t$reply = new Reroute("},{"line":171,"text":"\t\t\t\t\t\t$this->app->getErrorRoute('Exception', ['exception' => $e], $responseType)"},{"line":172,"text":"\t\t\t\t\t);"},{"line":173,"text":"\t\t\t\t\t$reply->setResponseType($responseType);"},{"line":174,"text":"\t\t\t\t\t$reply->setSectionContext($sectionContext);"},{"line":175,"text":"\t\t\t\t}"},{"line":176,"text":"\t\t\t\tcatch (\\Exception $e)"},{"line":177,"text":"\t\t\t\t{"},{"line":178,"text":"\t\t\t\t\t// this will only be hit in PHP 5.x"},{"line":179,"text":"\t\t\t\t\t$attemptErrorReroute = false;"},{"line":180,"text":""},{"line":181,"text":"\t\t\t\t\t$reply = new Reroute("},{"line":182,"text":"\t\t\t\t\t\t$this->app->getErrorRoute('Exception', ['exception' => $e], $responseType)"},{"line":183,"text":"\t\t\t\t\t);"},{"line":184,"text":"\t\t\t\t\t$reply->setResponseType($responseType);"},{"line":185,"text":"\t\t\t\t\t$reply->setSectionContext($sectionContext);"},{"line":186,"text":"\t\t\t\t}"},{"line":187,"text":"\t\t\t}"},{"line":188,"text":""},{"line":189,"text":"\t\t\tif ($reply instanceof Reroute)"},{"line":190,"text":"\t\t\t{"},{"line":191,"text":"\t\t\t\t$match = $reply->getMatch();"},{"line":192,"text":"\t\t\t\tif (!$match->getResponseType())"},{"line":193,"text":"\t\t\t\t{"},{"line":194,"text":"\t\t\t\t\t$match->setResponseType($responseType);"},{"line":195,"text":"\t\t\t\t}"},{"line":196,"text":"\t\t\t\tif (!$match->getSectionContext())"},{"line":197,"text":"\t\t\t\t{"},{"line":198,"text":"\t\t\t\t\t$match->setSectionContext($sectionContext);"},{"line":199,"text":"\t\t\t\t}"},{"line":200,"text":"\t\t\t}"},{"line":201,"text":"\t\t\telse"},{"line":202,"text":"\t\t\t{"},{"line":203,"text":"\t\t\t\tbreak;"},{"line":204,"text":"\t\t\t}"},{"line":205,"text":"\t\t}"},{"line":206,"text":"\t\twhile ($i++ < 10);"},{"line":207,"text":""},{"line":208,"text":"\t\tif ($reply instanceof Reroute)"},{"line":209,"text":"\t\t{"},{"line":210,"text":"\t\t\t// rerouted too many times"},{"line":211,"text":"\t\t\t$reply = new Error("},{"line":212,"text":"\t\t\t\t'An error occurred while the page was being generated. Please try again later.',"},{"line":213,"text":"\t\t\t\t500"},{"line":214,"text":"\t\t\t);"},{"line":215,"text":"\t\t\t$reply->setResponseType($responseType);"},{"line":216,"text":"\t\t\t$reply->setSectionContext($sectionContext);"},{"line":217,"text":"\t\t}"},{"line":218,"text":""},{"line":219,"text":"\t\t$this->app->postDispatch($reply, $match, $originalMatch);"},{"line":220,"text":""},{"line":221,"text":"\t\t$this->app->fire($this->eventPrefix . '_post_dispatch', [$this, &$reply, $match, $originalMatch]);"},{"line":222,"text":""},{"line":223,"text":"\t\treturn $reply;"},{"line":224,"text":"\t}"},{"line":225,"text":""},{"line":226,"text":"\tprotected function handleControllerError($e, $attemptErrorReroute, $controller, array $state = [])"},{"line":227,"text":"\t{"},{"line":228,"text":"\t\t/** @var \\Throwable $e */"},{"line":229,"text":""},{"line":230,"text":"\t\t$state = array_replace(["},{"line":231,"text":"\t\t\t'responseType' => null,"},{"line":232,"text":"\t\t\t'sectionContext' => '',"},{"line":233,"text":"\t\t\t'action' => '',"},{"line":234,"text":"\t\t\t'params' => null,"},{"line":235,"text":"\t\t], $state);"},{"line":236,"text":""},{"line":237,"text":"\t\tif ($attemptErrorReroute)"},{"line":238,"text":"\t\t{"},{"line":239,"text":"\t\t\t\\XF::logException($e, true); // rollback as don't know the state"},{"line":240,"text":""},{"line":241,"text":"\t\t\t$reply = new Reroute("},{"line":242,"text":"\t\t\t\t$this->app->getErrorRoute('Exception', ['exception' => $e], $state['responseType'])"},{"line":243,"text":"\t\t\t);"},{"line":244,"text":"\t\t}"},{"line":245,"text":"\t\telse"},{"line":246,"text":"\t\t{"},{"line":247,"text":"\t\t\t$reply = new Error("},{"line":248,"text":"\t\t\t\t'An error occurred while the page was being generated. Please try again later.',"},{"line":249,"text":"\t\t\t\t500"},{"line":250,"text":"\t\t\t);"},{"line":251,"text":"\t\t}"},{"line":252,"text":""},{"line":253,"text":"\t\t$reply->setResponseType($state['responseType']);"},{"line":254,"text":"\t\t$reply->setSectionContext($state['sectionContext']);"},{"line":255,"text":""},{"line":256,"text":"\t\tif ($controller instanceof Controller)"},{"line":257,"text":"\t\t{"},{"line":258,"text":"\t\t\t$controller->applyReplyChanges($state['action'], $state['params'] ?: new ParameterBag(), $reply);"},{"line":259,"text":"\t\t}"},{"line":260,"text":""},{"line":261,"text":"\t\treturn $reply;"},{"line":262,"text":"\t}"},{"line":263,"text":""},{"line":264,"text":"\tpublic function dispatchFromMatch(RouteMatch $match, &$controller = null, ?AbstractReply $previousReply = null)"},{"line":265,"text":"\t{"},{"sep":true},{"line":277,"text":"\t\t$action,"},{"line":278,"text":"\t\tRouteMatch $match,"},{"line":279,"text":"\t\t&$controller = null,"},{"line":280,"text":"\t\t?AbstractReply $previousReply = null"},{"line":281,"text":"\t)"},{"line":282,"text":"\t{"},{"line":283,"text":"\t\t$params = $match->getParameterBag();"},{"line":284,"text":"\t\tif (!$params)"},{"line":285,"text":"\t\t{"},{"line":286,"text":"\t\t\t$params = new ParameterBag();"},{"line":287,"text":"\t\t}"},{"line":288,"text":""},{"line":289,"text":"\t\t$responseType = $match->getResponseType();"},{"line":290,"text":""},{"line":291,"text":"\t\tif (!$controllerClass)"},{"line":292,"text":"\t\t{"},{"line":293,"text":"\t\t\treturn new Reroute("},{"line":294,"text":"\t\t\t\t$this->app->getErrorRoute('DispatchError', ["},{"line":295,"text":"\t\t\t\t\t'code' => 'no_controller',"},{"line":296,"text":"\t\t\t\t\t'controller' => $controllerClass,"},{"line":297,"text":"\t\t\t\t\t'action' => is_string($action) ? $action : null,"},{"line":298,"text":"\t\t\t\t\t'match' => $match,"},{"line":299,"text":"\t\t\t\t], $responseType)"},{"line":300,"text":"\t\t\t);"},{"line":301,"text":"\t\t}"},{"line":302,"text":""},{"line":303,"text":"\t\t$controller = $this->app->controller($controllerClass, $this->request);"},{"line":304,"text":"\t\tif (!$controller)"},{"line":305,"text":"\t\t{"},{"line":306,"text":"\t\t\treturn new Reroute("},{"line":307,"text":"\t\t\t\t$this->app->getErrorRoute('DispatchError', ["},{"line":308,"text":"\t\t\t\t\t'code' => 'invalid_controller',"},{"line":309,"text":"\t\t\t\t\t'controller' => $controllerClass,"},{"line":310,"text":"\t\t\t\t\t'action' => is_string($action) ? $action : null,"},{"line":311,"text":"\t\t\t\t\t'match' => $match,"},{"line":312,"text":"\t\t\t\t], $responseType)"},{"line":313,"text":"\t\t\t);"},{"line":314,"text":"\t\t}"},{"line":315,"text":""},{"line":316,"text":"\t\t$controller->setupFromMatch($match);"},{"line":317,"text":"\t\tif ($previousReply)"},{"line":318,"text":"\t\t{"},{"line":319,"text":"\t\t\t$controller->setupFromReply($previousReply);"},{"line":320,"text":"\t\t}"},{"line":321,"text":""},{"line":322,"text":"\t\tif ($action instanceof \\Closure)"},{"line":323,"text":"\t\t{"},{"line":324,"text":"\t\t\t$action = $action($controller, $responseType, $params);"},{"line":325,"text":"\t\t}"},{"line":326,"text":"\t\telse"},{"line":327,"text":"\t\t{"},{"line":328,"text":"\t\t\t$action = preg_replace('#[^a-z0-9]#i', ' ', $action);"},{"line":329,"text":"\t\t\t$action = str_replace(' ', '', ucwords($action));"},{"line":330,"text":"\t\t}"},{"line":331,"text":""},{"line":332,"text":"\t\t$method = 'action' . $action;"},{"line":333,"text":"\t\tif (!is_callable([$controller, $method]))"},{"line":334,"text":"\t\t{"},{"line":335,"text":"\t\t\t$reply = new Reroute("},{"line":336,"text":"\t\t\t\t$this->app->getErrorRoute('DispatchError', ["},{"line":337,"text":"\t\t\t\t\t'code' => 'invalid_action',"},{"line":338,"text":"\t\t\t\t\t'controller' => $controllerClass,"},{"line":339,"text":"\t\t\t\t\t'action' => $action,"},{"line":340,"text":"\t\t\t\t\t'match' => $match,"},{"line":341,"text":"\t\t\t\t], $responseType)"},{"line":342,"text":"\t\t\t);"},{"line":343,"text":""}],"path":"src/XF/Mvc/Dispatcher.php","present":true,"sha256":"ff47c67e92d0490db099eb588b0ad5d1b96c537062338f53ea82f8f55224ceb1"}],"error":null,"exact":{"controller_pwa":{"bytes":715,"present":true,"sha256":"9e3217d9524349a8137b89d418e4693ca17f8e5f61ba5b563fff747d1014efb3","text":"<?php\n\nnamespace Gram\\Support\\Pub\\Controller;\n\nfinal class Pwa extends \\XF\\Pub\\Controller\\AbstractController\n{\n    private function assertStaff(): void\n    {\n        $visitor = \\XF::visitor();\n\n        if (!$visitor->user_id\n            || (!$visitor->hasPermission('gramSupport', 'manage')\n                && !$visitor->hasPermission('gramSupport', 'viewAll')))\n        {\n            throw $this->exception($this->noPermission());\n        }\n    }\n\n    public function actionIndex()\n    {\n        $this->assertStaff();\n        $this->setResponseType('raw');\n\n        return $this->view(\n            'Gram\\Support:PwaServiceWorker',\n            'gram_support_staff_service_worker',\n            []\n        );\n    }\n}\n"},"view_pwa_service_worker":{"bytes":381,"present":true,"sha256":"700f01f005b818d63267e70dac7669a606c78fabbef5d3e01731c49db3d0be04","text":"<?php\n\nnamespace Gram\\Support\\Pub\\View;\n\nclass PwaServiceWorker extends \\XF\\Mvc\\View\n{\n    public function renderRaw()\n    {\n        $this->response->contentType('application/javascript', 'utf-8');\n\n        $js = $this->renderTemplate(\n            'public:gram_support_staff_service_worker',\n            $this->params\n        );\n\n        return $this->response->body($js);\n    }\n}\n"}},"ok":true,"render_raw_implementations":[{"hits":[{"line":9,"text":"\tpublic function renderRaw()"}],"path":"src/XF/Pub/View/Error/EmbeddedImageRequest.php","sha256":"dae0d06414fc6778a17187e9c5cab5e2923fb5484733a3b193d8d28b6c381d71"},{"hits":[{"line":9,"text":"\tpublic function renderRaw()"}],"path":"src/XF/Pub/View/Attachment/View.php","sha256":"5addd9bb6b49abb0c83d52d0390db22d62ccff84854cd90eb8015c35fe93e5be"},{"hits":[{"line":9,"text":"\tpublic function renderRaw()"}],"path":"src/XF/Api/View/Attachment/View.php","sha256":"6e1fceda47e3773d05d3a068b5af89436a2ebb4bd73b8ce1ac04e555e1908bd0"},{"hits":[{"line":11,"text":"\tpublic function renderRaw()"}],"path":"src/XF/Admin/View/User/EmailList.php","sha256":"e5d72d2a23a66cf0b70086ce2e39e3be0ed076551df4300d3af16112f7ec1876"},{"hits":[{"line":14,"text":"\tpublic function renderRaw()"}],"path":"src/XF/Admin/View/User/ExportListing.php","sha256":"b414d9898a7f68b34ad964c91f26d4f759948034bb83a508f3dcc169ca830c2e"},{"hits":[{"line":9,"text":"\tpublic function renderRaw()"}],"path":"src/XF/Admin/View/AddOn/Icon.php","sha256":"2626f56b3f7353f452e844b46b75aa7501769c7c1e5dc91a89a455efc8b2d2f4"},{"hits":[{"line":9,"text":"\tpublic function renderRaw()"}],"path":"src/XF/Admin/View/Attachment/View.php","sha256":"2ecfa72cebb7ac80e0d9b7290b8b24f20a74bd7367c9aabadf69e0ee7bdf14f4"},{"hits":[{"line":11,"text":"\tpublic function renderRaw()"}],"path":"src/XF/Admin/View/Log/ImageProxy/Image.php","sha256":"b83a8022066c68bf55d9e0ef1b2a6586dc01b129418861eabc9aeb4e6da6d300"},{"hits":[{"line":9,"text":"\tpublic function renderRaw()"}],"path":"src/XF/Admin/View/Log/EmailBounce/View.php","sha256":"01a4cc67a7184293fcc1180f48d24a323bc11574b8128373904e54192867d075"},{"hits":[{"line":18,"text":"\tpublic function renderRaw()"}],"path":"src/XF/Admin/View/Style/Export.php","sha256":"7c04dde645d1fb8c43ca801eee917c3de97ddb3c89bf1adc412e44db4bf2311e"},{"hits":[{"line":9,"text":"\tpublic function renderRaw()"}],"path":"src/XF/Install/View/Install/ConfigDownload.php","sha256":"5fc4ff410a4ce3d83bedce9a7e9e855802c71660377face69b4e3d237c94cb3f"},{"hits":[{"line":7,"text":"    public function renderRaw()"}],"path":"src/addons/Gram/Support/Pub/View/PwaServiceWorker.php","sha256":"700f01f005b818d63267e70dac7669a606c78fabbef5d3e01731c49db3d0be04"}]},"guest_stderr_present":false,"inner_rc":0,"ok":true,"out_truncated":false,"transport_rc":0,"transport_stderr_bytes":0,"transport_stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}
GRAM516R5RCA5_DECISION=PASS_SERVICE_WORKER_EXACT_SOURCE_CAPTURED
GRAM516R5RCA5_NEXT_GATE=BUILD_EXACT_SERVICE_WORKER_FIX
HOMELAB_RESULT_CONTRACT={"version":1,"command_id":"SUPPORT-260918-GRAM-SUPPORT-SERVICE-WORKER-EXACT-SOURCE-READONLY-516R5RCA5","status":"OK","changes_made":false,"rollback_started":false,"rollback_restored":null}

OUTPUT_END
CHAT_OUTPUT_END
