creativecommons.org
creativecommons.org copied to clipboard
Use HTTPS links for the license chooser
Feedback through info@ In the license selection page [Choose a License] where it spits out html metadata, can you modify it so that it generates the links in https (it currently gives http, but changing that to https doesn't break anything)?
No it shouldn't break anything.
We had a discussion a couple of years ago where changed the licenses to HTTPS by default and redirect all http traffic to https traffic. At the time it did break other functionality that we decided to remove (see #718 if you want to see what we were removing).
I think I would like to work on this issue. I am having a bit of trouble finding the file(s) with the JS for the metadata generator, though. @kgodey
@akmadian I'm not a cc developer, but I know where this is. It seems like part of the 'cc engine': https://github.com/creativecommons/cc.engine/tree/master/cc/engine
that sounds right to me, @aldenstpage can you confirm?
@mzeinstra is right, the current version of the chooser lives in cc.engine
I scoured the code in de cc.engine for references to using http over https. But if I understand correctly that ancient system uses http://creativecommons.org/licenses/index.rdf to select and present available licenses.
If so than no external party can honestly provide you with any guidance other than scrapping the cc engine en rebuilding that >10 year old script with something more contemporary and with up-to-date documentation. :)
If so than this also relates to whole license link translation issue: https://github.com/creativecommons/creativecommons.org/issues?q=is%3Aissue+is%3Aopen+label%3A%22License+Link+Translation+or+URL+Problem%22
creativecommons/cc.engine
cc/engine/chooser/xmp_template.pydef get_xmp_info(request_form, license, locale):(see line 36)- Variable/string formatting (see line 62)
cc/engine/chooser/views.pydef choose_xmp_view(request):(see line 572)licensevariable set by calling the_issue_license(request_form)function (see line 574)
def _issue_license(request_form):(see line 159)- returns value set by
cc.license.by_codefunction (ex. see line 178 - OR returns value set by
STANDARD_SELECTOR.by_answers(answers)function (see line 206)
- returns value set by
STANDARD_SELECTORdefinition contains http url (see line 29):STANDARD_SELECTOR = cc.license.LicenseSelector( "http://creativecommons.org/license/")
creativecommons/cc.license
...ok, I ran out of steam, but there are multiple string occurrences:
cc/license/jurisdictions/__init__.py
80: 'http://creativecommons.org/license/')
cc/license/tests/test_questions.py
13: 'standard', 'http://creativecommons.org/license/')
cc/license/tests/test_lib.py
123: 'http://creativecommons.org/license/sampling/'),
cc/license/_lib/functions.py
289: '{ ?license cc:licenseClass <http://creativecommons.org/license/> .'
cc/license/_lib/classes.py
337: 'http://creativecommons.org/license/'
@mzeinstra the future of the chooser/license software is beyond the scope of this issue :)
Internally, we're still working on the preparing to have a discussion about their future. Please feel free to open a new issue if you have additional thoughts, opinions, etc.!
Yep, I was wondering where this fit in with GSoC ;) @TimidRobot
@TimidRobot Thanks for the steam :) and I take my comment back. It is indeed out of scope, but I was also wrong.
However, as far as I can tell none of the lines your refer to is the root of the issue here. http://creativecommons.org/license/ is a redirect to the chooser itself. All licenses have the root http://creativecommons.org/licenses/ (not the plural of license.
But your steam did help me probably pinpoint the actual point at which this is set:
LICENSES_BASE = 'http://creativecommons.org/licenses/'
at https://github.com/creativecommons/cc.license/blob/a134299fdb0e882b84a2c181afc5588e13ae32df/cc/license/_lib/functions.py#L13
@kgodey I would like to work on this issue. Do I just need to change HTTP to https?
tagging @TimidRobot to answer the question.
The root of this issue is that the legacy ccEngine uses the RDF data as the source of its truth. The RDF data uses http:// and that is unlikely to be change (License URIs use http uri scheme, not https · Issue #7 · creativecommons/cc.licenserdf).
Changing LICENSES_BASE won't work because it will no longer match the RDF (ex. cc/license/_lib/functions.py Line 84). The code needs to be refactored to accept/work with both HTTP and HTTPS while preferring HTTPS.
It may be better to focus on releasing the replacement creativecommons/chooser instead.