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

[stable27] fix(dav): Always respond custom error page on exceptions #48297

Open
wants to merge 5 commits into
base: stable27
Choose a base branch
from

Conversation

artonge and others added 4 commits September 23, 2024 15:23
Signed-off-by: Louis Chemineau <louis@chmn.me>
The `<?xml` tag is interpreted as PHP short tags, so this causes errors.
Instead just print that part of the template.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Louis Chemineau <louis@chmn.me>
…utput

Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge artonge added the 2. developing Work in progress label Sep 23, 2024
@artonge artonge self-assigned this Sep 23, 2024
@artonge artonge changed the title Artonge/backport/stable27/47770 [stable27] fix(dav): Always respond custom error page on exceptions Sep 23, 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
Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge
Copy link
Contributor Author

artonge commented Sep 23, 2024

/backport! to stable26

@artonge
Copy link
Contributor Author

artonge commented Sep 23, 2024

/backport! to stable25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants