path: also guard .gitmodules
against NTFS Alternate Data Streams
We just safe-guarded `.git` against NTFS Alternate Data Stream-related attack vectors, and now it is time to do the same for `.gitmodules`. Note: In the added regression test, we refrain from verifying all kinds of variations between short names and NTFS Alternate Data Streams: as the new code disallows _all_ Alternate Data Streams of `.gitmodules`, it is enough to test one in order to know that all of them are guarded against. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@ -408,6 +408,9 @@ test_expect_success 'match .gitmodules' '
|
||||
~1000000 \
|
||||
~9999999 \
|
||||
\
|
||||
.gitmodules:\$DATA \
|
||||
"gitmod~4 . :\$DATA" \
|
||||
\
|
||||
--not \
|
||||
".gitmodules x" \
|
||||
".gitmodules .x" \
|
||||
@ -432,7 +435,9 @@ test_expect_success 'match .gitmodules' '
|
||||
\
|
||||
GI7EB~1 \
|
||||
GI7EB~01 \
|
||||
GI7EB~1X
|
||||
GI7EB~1X \
|
||||
\
|
||||
.gitmodules,:\$DATA
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user