Skip to content

Normalise license MD5 values

username-removed-443319 requested to merge normalise-license-md5 into master

What does this MR do?

Normalise license data before taking the MD5, so that hashes match those in the license app.

Are there points in the code the reviewer needs to double check?

Does this seem reasonable? I don't think it needs a changelog entry.

Why was this MR needed?

License files uploaded in the UI always have newlines as separators, with a single trailing newline.

Licenses pasted in the text box will have newlines replaced by \r\n by the browser, and may have zero trailing newlines, or many.

Normalising these to a canonical form lets us match against the license app more efficiently.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Related to https://dev.gitlab.org/gitlab/license-app/merge_requests/59.

Merge request reports

Loading