~moody/rc-gemd

rc-gemd/handlers/dir-index -rwxr-xr-x 169 bytes
8b3ea55d — Jacob Moody path name should be cleaned, prevents $fs_root escape 2 months ago
                                                                                
1
2
3
4
5
6
7
8
#!/bin/rc
full_path=`{echo $"fs_root^$"location | urlencode -d}
full_path=$"full_path

echo '20 text/gemini'^$cr
ls $full_path | sed '
		s,^'$fs_root'/,,g
		s,^,=> /,g'