Skip to content

Commit

Permalink
Ensure LicenseRef file name follows SPDX constraints
Browse files Browse the repository at this point in the history
SPDX dictates ASCII in the way they refer to the RFC5234 standard and repeat it through the specification.

Co-authored-by: Nico Rikken <nico@nicorikken.eu>
  • Loading branch information
sgaist and nicorikken committed Apr 27, 2023
1 parent f900345 commit 049ba38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reuse/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"https://raw.githubusercontent.com/spdx/license-list-data/master/text/"
)

REF_RE = re.compile("LicenseRef-.+")
REF_RE = re.compile("LicenseRef-[a-zA-Z0-9-.]+$")


def download_license(spdx_identifier: str) -> str:
Expand Down

0 comments on commit 049ba38

Please sign in to comment.