Commit e54e7b2
Simon Coffey
Support milliseconds in cacheDuration parsing
Since the introduction of cacheDuration parsing in 25cbddd we've been
seeing parsing failures for one of our IdPs, whose cacheDuration value
is set to
cacheDuration="PT6H0M0.000S"
This seems like a perfectly valid ISO8601 duration - the regexp being
used for parsing doesn't provide for the possibility of milliseconds.
This adds an optional non-captured group to the regexp to permit them.
Since the captured string value is already being converted using .to_f,
it appears this should work as-is.
To achieve minimal test coverage I've added a seconds string to one of
the existing metadata examples with a zero value; this reproduces the
failure and confirms the fix without needing to add a specific test
case.1 parent bbb4fb6 commit e54e7b2
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments