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

Fixed the escaping of back slashes and << in console output #23730

Closed
wants to merge 3 commits into
base: 2.7
from

Conversation

@javiereguiluz
Member

javiereguiluz commented Jul 31, 2017

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #18481
License MIT
Doc PR -

Not sure if it's a valid solution, but this is my attempt to solve #18481.

@xabbuh xabbuh added this to the 2.7 milestone Aug 1, 2017

@chalasr chalasr requested a review from nicolas-grekas Aug 4, 2017

@javiereguiluz

This comment has been minimized.

Show comment
Hide comment
@javiereguiluz

javiereguiluz Aug 28, 2017

Member

Thanks for the reviews! I've fixed the error pointed out by @julienfalque. About this question from @nicolas-grekas:

to be safe, what about removing \0 from $text also?

I'm not sure I fully understand what you mean. Can you show me the code changes you want me to do? Thanks!

Member

javiereguiluz commented Aug 28, 2017

Thanks for the reviews! I've fixed the error pointed out by @julienfalque. About this question from @nicolas-grekas:

to be safe, what about removing \0 from $text also?

I'm not sure I fully understand what you mean. Can you show me the code changes you want me to do? Thanks!

@@ -50,7 +50,7 @@ public static function escapeTrailingBackslash($text)
if ('\\' === substr($text, -1)) {
$len = strlen($text);
$text = rtrim($text, '\\');
$text .= str_repeat('<<', $len - strlen($text));

This comment has been minimized.

@nicolas-grekas

nicolas-grekas Aug 29, 2017

Member

I meant this here:
$text = str_replace("\0", '', $text);
(or more generally: what happens/should happen when $text already has "\0" in it?)

@nicolas-grekas

nicolas-grekas Aug 29, 2017

Member

I meant this here:
$text = str_replace("\0", '', $text);
(or more generally: what happens/should happen when $text already has "\0" in it?)

@fabpot

This comment has been minimized.

Show comment
Hide comment
@fabpot

fabpot Aug 29, 2017

Member

Thank you @javiereguiluz.

Member

fabpot commented Aug 29, 2017

Thank you @javiereguiluz.

fabpot added a commit that referenced this pull request Aug 29, 2017

bug #23730 Fixed the escaping of back slashes and << in console outpu…
…t (javiereguiluz)

This PR was squashed before being merged into the 2.7 branch (closes #23730).

Discussion
----------

Fixed the escaping of back slashes and << in console output

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18481
| License       | MIT
| Doc PR        | -

Not sure if it's a valid solution, but this is my attempt to solve #18481.

Commits
-------

d5cb1fe Fixed the escaping of back slashes and << in console output
@fabpot

fabpot approved these changes Aug 29, 2017

@fabpot fabpot closed this Aug 29, 2017

@fabpot fabpot referenced this pull request Sep 11, 2017

Merged

Release v3.3.9 #24156

This was referenced Oct 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment