Fix attachment cleanup when file names contain parenthesis#2383
Merged
Fix attachment cleanup when file names contain parenthesis#2383
Conversation
Member
Author
|
/compile amend |
…here are parenthesis in the file names Signed-off-by: Julien Veyssier <eneiluj@posteo.net> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
6738d82 to
91d17e5
Compare
Member
Author
|
Btw, tests were working because we encode links with Php but in real life, Javascript does it. |
Member
|
/compile amend |
…nup-get-names-2 Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
6055257 to
a29f84a
Compare
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
Member
|
/compile amend |
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2ff0222 to
42c54fa
Compare
…loud/text into fix/attachment-cleanup-get-names-2
vinicius73
reviewed
May 11, 2022
| .find('img') | ||
| .should('have.attr', 'src') | ||
| .should('contain', 'apps/text/image?documentId=' + documentId) | ||
| .should('contain', 'imageFileName=' + encodeURIComponent(imageName)) |
Member
There was a problem hiding this comment.
@eneiluj I don't know exactly the reason for this behavior, but looks like the element appears different when we read the attribute.
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
bec28fc to
1cfd0de
Compare
vinicius73
approved these changes
May 12, 2022
Member
|
/backport to stable24 |
|
The backport to stable24 failed. Please do this backport manually. |
julien-nc
pushed a commit
that referenced
this pull request
May 13, 2022
… also fixes cleanup when there are parenthesis in the file names Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
nextcloud-command
pushed a commit
that referenced
this pull request
May 13, 2022
… also fixes cleanup when there are parenthesis in the file names Signed-off-by: Julien Veyssier <eneiluj@posteo.net> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
julien-nc
pushed a commit
that referenced
this pull request
May 13, 2022
… also fixes cleanup when there are parenthesis in the file names Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
nextcloud-command
pushed a commit
that referenced
this pull request
May 13, 2022
… also fixes cleanup when there are parenthesis in the file names Signed-off-by: Julien Veyssier <eneiluj@posteo.net> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an alternative of #2382.
We can keep the basic regex to look for attachment links if we make sure they are properly encoded by the frontend.
encodeURIComponentdoes not actually encode those chars!'()*. Let's make sure we do.