CASC-55
added the check for the "/" to both the proxy retriever and the validators.
This commit is contained in:
parent
74b3d60843
commit
a7d06fd666
|
|
@ -99,9 +99,9 @@ public final class Cas20ProxyRetriever implements ProxyRetriever {
|
|||
private String constructUrl(final String proxyGrantingTicketId,
|
||||
final String targetService) {
|
||||
try {
|
||||
return this.casServerUrl + "proxy" + "?pgt="
|
||||
+ proxyGrantingTicketId + "&targetService="
|
||||
+ URLEncoder.encode(targetService, "UTF-8");
|
||||
return this.casServerUrl + (this.casServerUrl.endsWith("/") ? "" : "/") + "proxy" + "?pgt="
|
||||
+ proxyGrantingTicketId + "&targetService="
|
||||
+ URLEncoder.encode(targetService, "UTF-8");
|
||||
} catch (final UnsupportedEncodingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,9 @@ public abstract class AbstractUrlBasedTicketValidator implements TicketValidator
|
|||
int i = 0;
|
||||
synchronized (buffer) {
|
||||
buffer.append(this.casServerUrlPrefix);
|
||||
buffer.append("/");
|
||||
if (!this.casServerUrlPrefix.endsWith("/")) {
|
||||
buffer.append("/");
|
||||
}
|
||||
buffer.append(suffix);
|
||||
|
||||
for (final Iterator iter = urlParameters.entrySet().iterator(); iter.hasNext();) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue