8000 Change file download urls to pull from https by mrluc · Pull Request #24 · unicode-rs/unicode-security · GitHub
[go: up one dir, main page]

Skip to content

Change file download urls to pull from https #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 22, 2021

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
0