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

Wrap SQL error message in CDATA #2518

Closed
nitriques opened this issue Nov 6, 2015 · 2 comments
Closed

Wrap SQL error message in CDATA #2518

nitriques opened this issue Nov 6, 2015 · 2 comments

Comments

@nitriques
Copy link
Member

Like here.

It should be

$result->appendChild(new XMLElement('error', 
    General::wrapInCDATA($e->getMessage() . ' on ' . $e->getLine() . ' of file ' . $e->getFile())
));

@jensscherbl is that a breaking change ? It never contained xml... (I feel it's a bug fix, since it can crash the whole frontend because xml bla bla bla)

@nitriques nitriques added this to the 2.6.4 milestone Nov 6, 2015
@nitriques nitriques self-assigned this Nov 6, 2015
@jensscherbl
Copy link
Member

@jensscherbl is that a breaking change ?

Is this just for real exceptions, like SQL errors? Then no. Or also for expected results, like an empty result set or not executed data sources because of parameters etc. Then yes.

@nitriques
Copy link
Member Author

It's for all of them, so it is. Bump to 2.7.0

@nitriques nitriques modified the milestones: 2.7.0, 2.6.4 Nov 20, 2015
nitriques added a commit that referenced this issue Jun 6, 2016
Exceptions can come from remote servers (like MySQL or SMTP) and can
contain invalid xml data.

User exceptions can also break this rule. As a safety precaution, we
will wrap message just before ouput.

Also, it's worthy to say that multiple calls to
General::General::wrapInCDATA() is safe.

Fixes #2518
jensscherbl pushed a commit that referenced this issue May 28, 2017
Exceptions can come from remote servers (like MySQL or SMTP) and can
contain invalid xml data.

User exceptions can also break this rule. As a safety precaution, we
will wrap message just before ouput.

Also, it's worthy to say that multiple calls to
General::General::wrapInCDATA() is safe.

Fixes #2518
nitriques added a commit that referenced this issue Jun 16, 2017
Exceptions can come from remote servers (like MySQL or SMTP) and can
contain invalid xml data.

User exceptions can also break this rule. As a safety precaution, we
will wrap message just before ouput.

Also, it's worthy to say that multiple calls to
General::General::wrapInCDATA() is safe.

Fixes #2518

Picked from 2d8d5e0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants