]> Lady’s Gitweb - Gitweb/commit
gitweb: Use 's' regexp modifier to secure against filenames with LF
authorJakub Narebski <redacted>
Mon, 30 Oct 2006 21:25:11 +0000 (22:25 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:11 +0000 (00:07 -0400)
commit81cb34df0de736c83ff7c9d2a48b10d18460b78bda19ecd7a58bbda0e0d8dec7
tree5993f071198654bb98d4991dda2eefcc45dda1472f998c573ec6e8d550aaf368
parente53e58225f7186339ac23cd7e0649a355a6a71566d3e9babf41fdfe3396a1588
gitweb: Use 's' regexp modifier to secure against filenames with LF

Use 's' (treat string as single line) regexp modifier in
git_get_hash_by_path (against future changes, probably unnecessary)
and in parse_ls_tree_line (when called with '-z'=>1 option) to secure
against filenames containing newline.

[jc: the hunk on git_get_hash_by_path was unneeded, and I noticed the
 regexp was doing unnecessary capture, so fixed it up while I was at it.]

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.232067 seconds and 4 git commands to generate.