Team,
It appears that the java CAS client doubly encodes service urls; in particular the authentication filter. Once when the service url is constructed (which can be controlled via “encodeServiceUrl”) and then once when the redirect url to CAS is constructed [1]
Since service-url encoding is turned on by default, this causes the final url to be encoded twice. The protocol mentions that service urls are expected to be encoded, though I am not sure if CAS attempts to do any sort of decoding of urls internally?
Might be better to modify the behavior of “encodeServiceUrl” to apply to the entire redirect url, only once? And CAS to attempt and decode?
Misagh
--
You are currently subscribed to cas...@lists.jasig.org as: jasig-cas-dev+...@googlegroups.com
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Team,
It appears that the java CAS client doubly encodes service urls; in particular the authentication filter. Once when the service url is constructed (which can be controlled via “encodeServiceUrl”) and then once when the redirect url to CAS is constructed [1]
Since service-url encoding is turned on by default, this causes the final url to be encoded twice. The protocol mentions that service urls are expected to be encoded, though I am not sure if CAS attempts to do any sort of decoding of urls internally?
Might be better to modify the behavior of “encodeServiceUrl” to apply to the entire redirect url, only once? And CAS to attempt and decode?
Misagh
--
You are currently subscribed to cas...@lists.jasig.org as: scott.b...@gmail.com
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
Yes, but that’s not behavior I am seeing. Let me elaborate: When the authentication filter kicks in, it will attempt to construct the service url that will be encoded by default. (encodeUrl() here) The encoded service url is then used by the url redirection logic of the client, which in turn gets encoded via URLEncoder.encode(serviceUrl, "UTF-8"). This causes issues if I am using “service” in the configuration that is already encoded (because maybe the url has a character in it like “&”)
If I turn off the service url encoding at the first step via “encodeServiceUrl=false”, it will eventually still be encoded again by the URLEncoder when the client redirects flow to the CAS login endpoint, and subsequently won’t be recognized by the registry.
I am trying to CASify an application that is super sensitive to url parameters, etc and I cant instruct the client to not touch the service url at all. Does that help?
--
You are currently subscribed to cas...@lists.jasig.org as: mmoa...@unicon.net
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev
EncodeURl shouldn't do anything other than add a sessionID.
The issue here seems to be that you pre-encoded your URL in configuration and we assume you don't write your code pre-encoded?
Right, but the encoding is inevitable in this case because I need to use “service” in the web.xml and I need it to contain parameters that need to be encoded. (something like “&”)
I am still confusing by the SessionId added by the EncodeUrl. Would you mind qualifying that? I am seeing a URL encoder attempting to encode the service.
The protocol mentions that service urls are expected to be encoded, though I am not sure if CAS attempts to do any sort of decoding of urls internally?
Team,
It appears that the java CAS client doubly encodes service urls; in particular the authentication filter. Once when the service url is constructed (which can be controlled via “encodeServiceUrl”) and then once when the redirect url to CAS is constructed [1]
Since service-url encoding is turned on by default, this causes the final url to be encoded twice. The protocol mentions that service urls are expected to be encoded, though I am not sure if CAS attempts to do any sort of decoding of urls internally?
Might be better to modify the behavior of “encodeServiceUrl” to apply to the entire redirect url, only once? And CAS to attempt and decode?
Misagh
--
You are currently subscribed to cas...@lists.jasig.org as: roberto...@googlemail.com
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-dev