-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Script Security 1.33
The following code will fail in non-CPS-transformed sandboxed Groovy, but will pass in CPS-transformed-and-sandboxed Groovy or vanilla Groovy:
def m = [fruitA: 'apple', fruitB: 'banana'] def bKey = 'B' assert m."fruitB" == m."fruit${bKey}"
That's obviously wrong. Not sure yet where the problem is happening but will dig.
[JENKINS-46327] GString map identifiers don't work in sandboxed Groovy code
Remote Link | New: This issue links to "test reproducing included in script-security PR #143 (Web Link)" [ 17497 ] |
Description |
Original:
The following code will fail in non-CPS-transformed sandboxed Groovy, but will pass in CPS-transformed-and-sandboxed Groovy or vanilla Groovy: {code:groovy} def m = [fruitA: 'apple', fruitB: 'banana'] def bKey = 'B' assert m."fruitB" == m."fruit${bKey}"{code} That's obviously wrong. Not sure yet where the problem is happening but will dig. |
New:
The following code will fail in non-CPS-transformed sandboxed Groovy, but will pass in CPS-transformed-and-sandboxed Groovy or vanilla Groovy: {code:java} def m = [fruitA: 'apple', fruitB: 'banana'] def bKey = 'B' assert m."fruitB" == m."fruit${bKey}"{code} That's obviously wrong. Not sure yet where the problem is happening but will dig. |
Assignee | Original: Andrew Bayer [ abayer ] |