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
[FIX] web: prevent crash when searching for escaped strings #29324
Closed
Conversation
This file contains 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
@tbe-odoo You may be interested in this commit |
robodoo delegate=@Polymorphe57 |
ged-odoo
force-pushed
the
12.0-fixes-ged
branch
from
December 6, 2018 15:14
7c3b179
to
3aed70c
Compare
Recent works in the search view (in 12.0) on dynamic filters had an unfortunate effect: when the user tries to input escaped strings (for example "test" in custom filters, there was a crash. The reason is that the JS python parser (or more specifically, the tokenizer) was unable to parse that as a string. It worked before because the web client sent the raw string to the server. However, with dynamic filters, this is no longer the case, and we need to parse domains to be able to combine them. In this commit, we modify the tokenizer to be able to work with escaped strings.
ged-odoo
force-pushed
the
12.0-fixes-ged
branch
from
December 6, 2018 15:16
3aed70c
to
1d14479
Compare
robodoo r+ |
mgeubelle
reviewed
Dec 6, 2018
s = s | ||
.replace(/\\\"/g, '\\u0022') // for double quote | ||
.replace(/\\\'/g, '\\u0027'); // for single quote | ||
var max=s.length, tokens = [], start, end; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var max = s.length
robodoo
pushed a commit
that referenced
this pull request
Dec 6, 2018
Recent works in the search view (in 12.0) on dynamic filters had an unfortunate effect: when the user tries to input escaped strings (for example "test" in custom filters, there was a crash. The reason is that the JS python parser (or more specifically, the tokenizer) was unable to parse that as a string. It worked before because the web client sent the raw string to the server. However, with dynamic filters, this is no longer the case, and we need to parse domains to be able to combine them. In this commit, we modify the tokenizer to be able to work with escaped strings. closes #29324
Merged, thanks! |
miso-belica
pushed a commit
to miso-belica/py.js
that referenced
this pull request
Oct 3, 2020
Recent works in the search view (in 12.0) on dynamic filters had an unfortunate effect: when the user tries to input escaped strings (for example "test" in custom filters, there was a crash. The reason is that the JS python parser (or more specifically, the tokenizer) was unable to parse that as a string. It worked before because the web client sent the raw string to the server. However, with dynamic filters, this is no longer the case, and we need to parse domains to be able to combine them. In this commit, we modify the tokenizer to be able to work with escaped strings. closes odoo/odoo#29324
miso-belica
pushed a commit
to miso-belica/py.js
that referenced
this pull request
Oct 3, 2020
Recent works in the search view (in 12.0) on dynamic filters had an unfortunate effect: when the user tries to input escaped strings (for example "test" in custom filters, there was a crash. The reason is that the JS python parser (or more specifically, the tokenizer) was unable to parse that as a string. It worked before because the web client sent the raw string to the server. However, with dynamic filters, this is no longer the case, and we need to parse domains to be able to combine them. In this commit, we modify the tokenizer to be able to work with escaped strings. closes odoo/odoo#29324
miso-belica
pushed a commit
to miso-belica/py.js
that referenced
this pull request
Oct 3, 2020
Recent works in the search view (in 12.0) on dynamic filters had an unfortunate effect: when the user tries to input escaped strings (for example "test" in custom filters, there was a crash. The reason is that the JS python parser (or more specifically, the tokenizer) was unable to parse that as a string. It worked before because the web client sent the raw string to the server. However, with dynamic filters, this is no longer the case, and we need to parse domains to be able to combine them. In this commit, we modify the tokenizer to be able to work with escaped strings. closes odoo/odoo#29324
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.
Recent works in the search view (in 12.0) on dynamic filters had an
unfortunate effect: when the user tries to input escaped strings (for
example "test" in custom filters, there was a crash.
The reason is that the JS python parser (or more specifically, the
tokenizer) was unable to parse that as a string. It worked before
because the web client sent the raw string to the server. However, with
dynamic filters, this is no longer the case, and we need to parse
domains to be able to combine them.
In this commit, we modify the tokenizer to be able to work with escaped
strings.
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr