-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
JQuery Bug 878/1799 within JSONModel.loadData prevents from sending "??" #4064
Comments
Hello, Thank you for sharing this finding. I've created an internal incident DINC0180763. The status of the issue will be updated here in GitHub. Regards, |
Hello, |
Hi @SvBe , thanks for your answer. How can I send the JSON object as a payload of the POST request? URL encoding results in a json string which must be decoded by server side before unmarshalling. I tried:
and
-> resulting payload: %7B%22comment%22%3A%22ui5%20bug%20with%20following%20double%20question%20mark%20%3F%3F%22%7D I want a plain json payload like this: Using a unencoded String (with the jquery bug) seems to be the only option or am I missing something? Thanks in advance |
Hi Andy, |
Hi Sven, I double checked the API documentation and you are right. But I have a little trouble with the documentation: loadData: This last part is really unusual IMHO. POST requests are used to send a JSON payload in the request body, not a URL encoded string in (!) the request body. It is also uncommon to use query parameters with POST. However, it's quite common to use POST to retrieve JSON data when the query parameters would be too large or complex. For example, a search API. Or a store API with a processing result. Thanks again in advance for your time. Best regards |
Hello Andy, |
Hi Sven, sounds great. Thank you. |
JSONP is an outdated way to do cross-origin requests. To avoid JSONP by mistake JSONP is disabled. The replacement of ?? by a JSONP callback handler does not happen any more. PS1: Downport to 1.71 PS2: Resolve merge conflict Change-Id: I4afa94bb806c7af726f53f30f055f74bc5e9d845 SNOW: DINC0180763 Fixes: #4064 CR-Id: 002075125900002228842024 (cherry picked from commit a51660d)
JSONP is an outdated way to do cross-origin requests. To avoid JSONP by mistake JSONP is disabled. The replacement of ?? by a JSONP callback handler does not happen any more. PS1: Downport to 1.84 Change-Id: I4afa94bb806c7af726f53f30f055f74bc5e9d845 SNOW: DINC0180763 Fixes: #4064 CR-Id: 002075125900002228852024 (cherry picked from commit a51660d)
JSONP is an outdated way to do cross-origin requests. To avoid JSONP by mistake JSONP is disabled. The replacement of ?? by a JSONP callback handler does not happen any more. PS1: Downport to 1.96 PS2: Resolve merge conflict Change-Id: I4afa94bb806c7af726f53f30f055f74bc5e9d845 SNOW: DINC0180763 Fixes: #4064 CR-Id: 002075125900002228862024 (cherry picked from commit a51660d)
JSONP is an outdated way to do cross-origin requests. To avoid JSONP by mistake JSONP is disabled. The replacement of ?? by a JSONP callback handler does not happen any more. PS1: Downport to 1.108 PS2: Resolve build issue (revert ES6 syntax) Change-Id: I4afa94bb806c7af726f53f30f055f74bc5e9d845 SNOW: DINC0180763 Fixes: #4064 CR-Id: 002075125900002228872024 (cherry picked from commit a51660d)
JSONP is an outdated way to do cross-origin requests. To avoid JSONP by mistake JSONP is disabled. The replacement of ?? by a JSONP callback handler does not happen any more. PS1: Downport to 1.120 Change-Id: I4afa94bb806c7af726f53f30f055f74bc5e9d845 SNOW: DINC0180763 Fixes: #4064 CR-Id: 002075125900002228882024 (cherry picked from commit a51660d)
JSONP is an outdated way to do cross-origin requests. To avoid JSONP by mistake JSONP is disabled. The replacement of ?? by a JSONP callback handler does not happen any more. PS1: Downport to 1.121 PS2: Resolve merge conflict Change-Id: I4afa94bb806c7af726f53f30f055f74bc5e9d845 SNOW: DINC0180763 Fixes: #4064 CR-Id: 002075125900002228892024 (cherry picked from commit a51660d)
JSONP is an outdated way to do cross-origin requests. To avoid JSONP by mistake JSONP is disabled. The replacement of ?? by a JSONP callback handler does not happen any more. PS1: Downport to 1.124 Change-Id: I4afa94bb806c7af726f53f30f055f74bc5e9d845 SNOW: DINC0180763 Fixes: #4064 CR-Id: 002075125900002228902024 (cherry picked from commit a51660d)
Hi :)
OpenUI5 version: 1.71 (the version which we are using) - current version
Browser/version (+device/version): Chrome 125.0.6422.141 / Windows 10
URL (minimal example if possible): https://jsfiddle.net/4ybLwjd1/
Steps to reproduce the problem:
What is the expected result?
POST-Request with following Payload: {"comment":"ui5 bug with following double question mark ??"}
What happens instead?
POST-Request with following Payload: {"comment":"ui5 bug with following double question mark jQuery36009893453989128844_1718181516803"}
Any other information? (attach screenshot if possible)
![image](https://private-user-images.githubusercontent.com/43137272/338890997-e69d9370-f187-4d1f-8b3e-be62635b9642.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDU4NTksIm5iZiI6MTczOTM0NTU1OSwicGF0aCI6Ii80MzEzNzI3Mi8zMzg4OTA5OTctZTY5ZDkzNzAtZjE4Ny00ZDFmLThiM2UtYmU2MjYzNWI5NjQyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA3MzIzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVlNDlkOWIxMGFlYWRlNjM1ZGNkOWRhZGU4ODg1YzJkZTZiODQzYmY2MjRkYzBiMDdkMWM0NjBhYjZiYzBjNmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.P-BU0C94cygRJMYcm2IqjHUKaQ4W9iF4m9pSppdN324)
jquery/api.jquery.com#878
jquery/api.jquery.com#1005
jquery/jquery#1799
jquery/jquery#4754
https://stackoverflow.com/questions/17532018/submitting-jquery-ajax-data-with-string-containing-it-changes-value-to-jq
Workaround of jQuery is not possible because the parameter contentType of this._ajax cannot be set from JSONModel.loadData method:
![image](https://private-user-images.githubusercontent.com/43137272/338893129-c84125c0-e7c4-42a9-a449-670958575f6e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNDU4NTksIm5iZiI6MTczOTM0NTU1OSwicGF0aCI6Ii80MzEzNzI3Mi8zMzg4OTMxMjktYzg0MTI1YzAtZTdjNC00MmE5LWE0NDktNjcwOTU4NTc1ZjZlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA3MzIzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMzOWVkZmRmMjliY2FlM2ExZDliNjA3YTdjOTBiNTMyOGM5YWFlMzg2NDk1OGE3NWEzZDgxYjBmMmNkMGM5ZTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ueJ5_I6p3wHKRNY7XPmvEqm31PY3wIu0IDFR67oOsag)
Thanks in advance :)
The text was updated successfully, but these errors were encountered: