mirror of
https://github.com/gfwlist/gfwlist.git
synced 2024-12-25 16:15:18 +00:00
Prevent non-ASCII list from being submitted, which makes wrong checksum
This commit is contained in:
parent
5d37adda3c
commit
c1851403c2
@ -88,6 +88,9 @@ if [ "$*" == "" ]; then
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# make sure the list doesn't contain unicode chars
|
||||||
|
file list.txt | grep ASCII 1> /dev/null || (echo "List contains non-ASCII characters, please remove them." && exit 1) &&
|
||||||
|
|
||||||
# update date and checksum
|
# update date and checksum
|
||||||
sed -i s/"Last Modified:.*$"/"Last Modified: $(date -R -r list.txt)"/ list.txt &&
|
sed -i s/"Last Modified:.*$"/"Last Modified: $(date -R -r list.txt)"/ list.txt &&
|
||||||
./addChecksum.pl list.txt &&
|
./addChecksum.pl list.txt &&
|
||||||
|
Loading…
Reference in New Issue
Block a user