Replies: 1 comment 6 replies
-
|
indeed the feature was designed only for simple name/value inputs; extending it in the way you mention would probably work |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I'm trying to preserve POST data. The form has a textarea field.
The submitted form data is
"test
test
test
test"
During the redirection dance I see
mod_auth_openidc_preserve_post_params => {"test":"test%0D%0Atest%0D%0Atest%0D%0Atest%0D%0A"}
which looks good to me. (%0D%0A = CR LF)
After authentication with the idp the browser goes back to the redirect_uri, and then finally the browser does a POST again to the original location. In that request I see "testtesttesttest" - which has the newlines removed.
The Javascript used to replay the POST seems to be dropping that data.
https://github.com/zmartzone/mod_auth_openidc/blob/master/src/mod_auth_openidc.c#L494
behaves differently and is only valid for input elements, not textarea's. For example:
data="test%0D%0Atest%0D%0Atest%0D%0Atest%0D%0A"
input = document.createElement("input");
input.value = decodeURIComponent(data)
input.value
=> 'testtesttesttest'
area = document.createElement("textarea")
area.value = decodeURIComponent(data)
area.value
=> 'test\ntest\ntest\ntest\n'
I believe the element type also needs to be stored in the json data.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions