Fix typo in security check (and add regression unit test)

Change-Id: I52662287ff86925629ea8f6f5bc13855d403b3e8
3 files changed