Skip to content

Commit bcf1114

Browse files
committed
fix ticket validation parsing
1 parent b8736b9 commit bcf1114

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## Change Log
2+
### Version 1.4.0 (2024-09-17)
3+
- Fix validation parsing
24
### Version 1.3.0 (2020-12-28)
35
- Deploy using Github Action
46
### Version 1.2.0 (2019-04-15)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This plugin adds [CAS](https://en.wikipedia.org/wiki/Central_Authentication_Serv
1313

1414
```
1515
require:
16-
- cas -> cas 1.3.0
16+
- cas -> cas 1.4.0
1717
1818
repositories:
1919
- sismicsNexusRaw:

app/helpers/api/cas/service/ValidationService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public String validate(String ticket) {
4040
Document doc = XML.getDocument(r.body().byteStream());
4141
Node node0 = XPath.selectNodes("//*", doc).get(1);
4242
if ("cas:authenticationSuccess".equals(node0.getNodeName())) {
43-
Node node1 = XPath.selectNodes("//*", node0).get(1);
43+
Node node1 = XPath.selectNodes("//*[local-name() = 'cas:user']", node0).get(0);
4444
return node1.getTextContent().trim();
4545
} else {
4646
Logger.error("CAS validation error" + node0.getTextContent());

conf/dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
self: play -> cas 1.3.0
1+
self: play -> cas 1.4.0
22

33
configurations:
44
- provided:

0 commit comments

Comments
 (0)