Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
PUP 5.5.2, PUP 5.5.3, PUP 5.5.6, PUP 5.5.7, PUP 5.5.8, PUP 6.0.0, PUP 6.0.1, PUP 6.0.2, PUP 6.0.3, PUP 6.0.4
Description
Puppet Version: Anything greater than 5.X
Puppet Server Version: N/A
OS Name/Version: N/A
Download the simp_pki_service module from https://github.com/simp/pupmod-simp-simp_pki_service and run puppet parser validate manifests/kra.pp.
Use d07265e253bb2cb11314dbb962043a21a2cbad05 for the breaking behavior. Changing the fact call to a local variable did not show any issues.
Desired Behavior:
No validation errors should be shown (just as in Puppet 4)
Actual Behavior:
Puppet parser validation fails with a syntax error in the HEREDOC at line 123.
Note: Removing the only line in the comments section of the document causes the validation to no longer fail.
UPDATE
------
This is the same problem as in PUP-9163 which apparently did not fix all cases of the problem.
The issue is that the lexer looks at the wrong character when it is looking at what comes just before the [ char in an interpolated expression inside a heredoc. The position it is looking at depend on how much source text there is before the [ - if the erroneous position happens to be a space the result is a syntax error.