Skip to content
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

Official CC-BY-4.0 license text is not being matched correctly by LicenseCompareHelper.isTextStandardLicense() #233

Open
pmonks opened this issue Mar 26, 2024 · 3 comments

Comments

@pmonks
Copy link
Collaborator

pmonks commented Mar 26, 2024

When org.spdx.utility.compare.LicenseCompareHelper.isTextStandardLicense().isDifferenceFound() is run on the official CC-BY-4.0 license text, it (incorrectly) returns true (i.e. the standard license was not matched). When I run org.spdx.utility.compare.LicenseCompareHelper.isTextStandardLicense().getDifferenceMessage() on it, I get:

Normal text of license does not match starting at line #5 column #9 "commons" when comparing to template text "

By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms a...".  Last optional text was not found due to the optional difference:
	Normal text of license does not match starting at line #5 column #29 "(" when comparing to template text " Creative Commons Attribution 4.0 International Public License

".  Last optional text was not found due to the optional difference:
	Normal text of license does not match starting at line #42 column #5 "example" when comparing to template text "

Considerations for the public: By using one of our public licenses, a licensor grants the public p...".  Last optional text was not found due to the optional difference:
	Normal text of license does not match starting at line #42 column #5 "example" when comparing to template text "

Considerations for the public: By using one of our public licenses, a licensor grants the public p...".  Last optional text was not found due to the optional difference:
	Normal text of license does not match starting at line #1 column #12 "4" when comparing to template text "Creative Commons"

I don't see any mismatches when looking at the CC-BY-4.0 SPDX template however.

This was reproduced with Spdx-Java-Library v1.11 and SPDX license list v3.23.

@pmonks
Copy link
Collaborator Author

pmonks commented Mar 26, 2024

Note: this also seems to be occurring for some of the CC-BY-*-4.0 variations, including:

  • CC-BY-SA-4.0
  • CC-BY-NC-4.0
  • CC-BY-NC-SA-4.0
  • CC-BY-ND-4.0
  • CC-BY-NC-ND-4.0

(these are just the subset of CC-BY-*-4.0 licenses that I'm testing against - there may be issues with other variations too)

@goneall
Copy link
Member

goneall commented Mar 29, 2024

Thanks @pmonks for the analysis - I'm currently traveling for the next week or so - I'll take a look once I'm back

@pmonks
Copy link
Collaborator Author

pmonks commented Mar 29, 2024

As always no rush! I've been traveling a lot myself in recent weeks, so have also been less active than usual.

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

No branches or pull requests

2 participants