Normalise license MD5 values
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?
- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Related to https://dev.gitlab.org/gitlab/license-app/merge_requests/59.