Open
Description
Previous ID | SR-8678 |
Radar | None |
Original Reporter | @johnno1962 |
Type | Bug |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug, Parser |
Assignee | None |
Priority | Medium |
md5: 649261c2424597aabda9e63a57de79a9
Issue Description:
As was pointed out in the tail end of the discussion of SE-200 there is a potential security problem with multiple character string delimiters as are used by multiline strings and soon to be implemented “raw/delimited strings” as demonstrated by the following contrived code:
print("""
Validating password...
""")
guard user.validatePassword(password) else {
fatalError("get out!")
}
print("""
Password is valid!
""")
It contains a zero-width unicode character in the first closing delimiter so this code is treated as one string. In Xcode this mitigated by being syntax highlighted correctly but perhaps there is something here that deserves attention. A possible fix for this is included in the last commit on #17668