Commit 40a69bd
authored
When parsing the resource name `pattern`s to evaluate if a resource is a root/top-level resource, and pull out the parent resource if not, there was a bug where a leading slash on a root/top-level resource would make it think the pattern was multi-segmented (because it just checks for how many segments separators the `pattern` has). This would result in following through to logic that expected multiple items in a slice when there was only one, resulting in an out of bounds panic. We can handle this by trimming leading/trailing separators from the pattern before evaluating the pattern as a root/top-level resource
Updates #1514
1 parent 2454606 commit 40a69bd
2 files changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
46 | 66 | | |
47 | 67 | | |
48 | 68 | | |
| |||
0 commit comments