Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

mrluc
Copy link
Contributor

@mrluc mrluc commented Nov 21, 2021

I was reading this over to understand how rust uses the unicode data files, and how rust handles these sort of unicode security issues, and I noticed that when it downloads the source files, the urls it's curling aren't https:

# Download a Unicode security table file
def fetch(f):
if not os.path.exists(os.path.basename(f)):
os.system("curl -O http://www.unicode.org/Public/security/%s/%s"
% (UNICODE_VERSION_NUMBER, f))
if not os.path.exists(os.path.basename(f)):
sys.stderr.write("cannot load %s\n" % f)
exit(1)
# Download a UCD table file
def fetch_unidata(f):
if not os.path.exists(os.path.basename(f)):
os.system("curl -O http://www.unicode.org/Public/%s/ucd/%s"
% (UNICODE_VERSION_NUMBER, f))
if not os.path.exists(os.path.basename(f)):
sys.stderr.write("cannot load %s" % f)
exit(1)

Of course this is in a script that runs pre-commit, and for that + likely many other reasons that I'm ignorant of, this PR may not be needed.

Btw thanks for all you're doing in this repo/crate. This code + its comments are the only thing that's helping me see how one can go from 'tc39 provided files' to 'prevent/warn of naughtiness in source code'. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants