Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable29] fix(dav): Always respond custom error page on exceptions #47786

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Sep 5, 2024

Backport of PR #47770

Signed-off-by: Louis Chemineau <louis@chmn.me>
@backportbot backportbot bot added bug 3. to review Waiting for reviews feature: dav php Pull requests that update Php code labels Sep 5, 2024
@backportbot backportbot bot added this to the Nextcloud 29.0.7 milestone Sep 5, 2024
} else {
$templateName = 'xml_exception';
$renderAs = null;
$this->server->httpResponse->setHeader('Content-Type', 'application/xml; charset=utf-8');

Check notice

Code scanning / Psalm

PossiblyNullPropertyFetch Note

Cannot get property on possibly null variable $this->server of type Sabre\DAV\Server|null
} else {
$templateName = 'xml_exception';
$renderAs = null;
$this->server->httpResponse->setHeader('Content-Type', 'application/xml; charset=utf-8');

Check notice

Code scanning / Psalm

PossiblyNullReference Note

Cannot call method setHeader on possibly null value
$content = new OC_Template('core', $templateName, 'guest');
$debug = $this->config->getSystemValueBool('debug', false);

$content = new OC_Template('core', $templateName, $renderAs);

Check notice

Code scanning / Psalm

PossiblyNullArgument Note

Argument 3 of OC_Template::__construct cannot be null, possibly null value provided
if (BrowserErrorPagePlugin::isBrowserRequest($request)) {
$this->server->addPlugin(new BrowserErrorPagePlugin());
}
$this->server->addPlugin(new ErrorPagePlugin($this->request, \OC::$server->getConfig()));

Check notice

Code scanning / Psalm

DeprecatedMethod Note

The method OC\Server::getConfig has been marked as deprecated
@artonge artonge merged commit 8f28394 into stable29 Sep 5, 2024
177 checks passed
@artonge artonge deleted the backport/47770/stable29 branch September 5, 2024 20:44
@Altahrim Altahrim mentioned this pull request Sep 11, 2024
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug feature: dav php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants