Comments (28)
html purifier works has a replacement, tried and tested. If you guys could provide some unit tests with expected behaviors I would be happy to do the port over.
from h5p-php-library.
Hi @xarhsdev it is https://github.com/h5p/h5p-php-library/blob/master/h5p.classes.php#L3168 and everything it uses. Especially filter xss
from h5p-php-library.
Could you guys at least move the GPL'd code to a separate file and declare a less problematic license for the rest?
Currently the whole project is licensed under GPL v3 and some of the issue tickets here in GitHub say that it's actually only the HTML purifier implementation that's intentionally GPL v3.
If everything else were MIT licensed, I'm pretty sure we can come up with MIT licensed code for the purifier part. However, to better understand the part that would need to be replaced, it must be first separated into clearly defined separate file.
from h5p-php-library.
@sr258 Since the JavaScript code for the core also lives in this repo under the GPL, and due to its nature is necessarily distributed to end users via their browser, doesn't that mean all other JS that the browser sees in the respective app would have to be GPLed as well?
from h5p-php-library.
Hi, we use GPL code for purifying user input. That code is GPL licensed so the code in this repository is GPL. We could perhaps move the purifier into a separate repo and make it possible for you to use different code to purify user input. What code are you using today to purify user input?
from h5p-php-library.
Hi
We are using this library:
"HTML Purifier"
https://doc.tiki.org/Purifier
Yes, making the specific purifier a result of a choice (to choose among
that one you currently use, or other ones such as "htmlpurifier") in
your code would help us to eventually integrate more easily your library
i our code, if that is required for some of our projects (there are high
chances that this happens, sooner or later, because the h5p project
looks veeeery interesting).
Xavier de Pedro
El 08/04/16 a les 15:36, Svein-Tore Griff With ha escrit:
Hi, we use GPL code for purifying user input. That code is GPL
licensed so the code in this repository is GPL. We could perhaps move
the purifier into a separate repo and make it possible for you to use
different code to purify user input. What code are you using today to
purify user input?—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#16 (comment)
from h5p-php-library.
Ok, please get back to us if you want to work more on this. I think we considered "HTML Purifier" as well, but it wasn't MIT compatible. Beeing LGPL would have been a step in the right direction but I think we went for the current code since htmlpurifier has a very large code base IIRC
from h5p-php-library.
Hi all
Thanks to @falcon-git for pointing me at the GPL code which apparently is the filter_xss and related functions in h5p.classes.php.
In Tiki we have our own function TikiFilter_PreventXss so we could use that to filter user input, if it was possible to somehow extract that GPL code from the main class and provide it separately - but i'm afraid i can really imagine quite how that would work... any ideas?
TIA
from h5p-php-library.
Hi, I haven't thought this through, but perhaps make H5PContentValidator into an abstract class with filter_xss being an abstract function?
from h5p-php-library.
If someone could take the time and put through like 10 strings through it, including the expected stuff to be filtered out and provide me the input and the output I will port it over to Purifier. Purifier is basically the defacto standard right now, in fact the code currently being used is somewhat dated. It may be a larger dependencies to take in but since there are plans I believe for composer support this would be a non issue.
from h5p-php-library.
You mean like unit tests or documentation? It is supposed to take in HTML as a string with potentially a lot of dangerous code and return HTML with all dangerous code escaped or stripped away but no harmless code should be removed. Test cases for this is probably not something a "normal friendly" dev should write, but we can find lots of examples of harmful HTML on the web.
from h5p-php-library.
Sweet. I will take a look and compile some tests. But does the filter not also intergrate with things h5p deems as safe such has a specific subset of style tags.
from h5p-php-library.
Yes, you are right, it takes in "white lists" for style patterns and tags.
from h5p-php-library.
hi @falcon-git. Is there any progress with this issue?
from h5p-php-library.
No, we're still looking for a replacement for the purifier we're using now. MIT licensed alternatives we've found have incredibly large code bases. Any tips?
from h5p-php-library.
hi @falcon-git and apologies for the delay.
Can you mention here the file(s) and line(s) under GPL license?
from h5p-php-library.
Hello @falcon-git, are there any news with regards to removing the GPL'd code from H5P?
from h5p-php-library.
Hi Guys. Any more information on this?
H5P is an awesome tool but this GPL'd code spoils absolutely everything and prevents a large number of H5P real world deployments.
Any alternatives to the GPL code?
Thanks in advance!
from h5p-php-library.
My question has to do with the font files, because it appears that they are common across multiple code bases.
Are they dual licensed or only MIT License or only GNU General Public License v3.0 or later licensed?
from h5p-php-library.
Any updates on this.can i deploy h5p as separate service and embed in corporate LMS platform. Does it violate GPL license?
from h5p-php-library.
Any updates on this? Also, if one wanted to build a platform integration for a non-php framework and only use the JS code of h5p-php-library, would the GPL still apply? If so, could the client-side stuff perhaps be moved out of this repo?
from h5p-php-library.
I've opened a related issue for separation of JS and PHP code, see #105. Besides the licensing issue, such a separation would also make it much easier to integrate H5P into non-PHP platforms.
from h5p-php-library.
Not sure if it‘s that easy to change the license retrospectively. There are more contributors than just Joubel and they‘d all have to agree that the license of their commits is changed, too. However, GPL 3 isn‘t that much of a problem if the code isn‘t used in a desktop program or an app.
from h5p-php-library.
I guess you can see the H5P core as a runtime environment, in which the other libraries are executed in. You can run non-GPL binaries in a GPL Linux system, after all.
from h5p-php-library.
The ability to execute non-GPL binaries on Linux is allowed because Linux kernel is not distributed on plain old GPL but uses a custom variant that allows executing non-GPL code.
Sure, GPL v3 + extra freedoms to make it logically MIT could be one solution but you cannot relicense the code without agreement from copyright holders.
from h5p-php-library.
Library code such as H5P should have freedom level of LGPL at minimum, preferably MIT/2-clause BSD to avoid problems with mixing the code from other sources. GPL only works if your intent is to actually enforce combined work to be distributed as GPL'd code, too.
from h5p-php-library.
Yes, certainly correct in theory, but the fact remains that the GPL 3 license is there at the moment. I've checked by running git shortlog -n -s -- js
who has contributed to the client folder and it looks like it's nearly only the Joubel Core team + Oliver Tacke. Not everybody still works there, I believe, however.
Here's the list of contributors + numbers of contribution:
258 Frode Petterson
108 Svein-Tore Griff With
63 Thomas Marstrander
38 Paal Joergensen
24 Oliver Tacke
18 thomasmars
13 Pål Jørgensen
7 Frank Ronny Larsen
6 Timothy Lim
5 Tom Arild Jakobsen
2 Andrew Downes
1 Ravi Majithia
1 falcon
1 otacke
@falcon-git @thomasmars @icc @fnoks What do you think about relicensing the client to MIT license (or LGPL) to avoid the infectious nature of GPL 3? It should not be too difficult to ask the contributors, as they are mostly your employees or ex-employees.
from h5p-php-library.
@sr258 Joubel has already received carte blanche from me :-)
from h5p-php-library.
Related Issues (20)
- h5peditor-select.js - make selected option criteria more flexible
- Is $CFG->mod_hvp_crossorigin documented somewhere? HOT 4
- Separate PHP and JavaScript code HOT 5
- Add triggers for saveContentState/setUserData
- H5P.getUserData not used asynchronously where required HOT 1
- GDPR infringement HOT 1
- Error while playing content in v1.24.3
- When is next release scheduled? HOT 3
- "We will make available documentation and tutorials for creating platform integrations in the future." HOT 2
- H5PExport::createExportFile() performance issues
- Error Uncaught TypeError: Cannot read properties of undefined (reading 'field') HOT 1
- H5PCore in Tag 1.24.4 has a missing function libraryToFolderName HOT 1
- Support for MPEG-DASH format
- [BUG] Invalid argument supplied for foreach()
- Allow using HTML tags MARK and ABBR in H5P content types HOT 5
- [BUG] iframe embeds are not populated in the parent context.
- Class file structure and simplifying integration into a framework HOT 1
- Resizing problems of the container when calling mozRequestFullScreen() HOT 5
- add Moodle comp for 1.26 HOT 3
- Moodle-Plugin mod_hvp produced embed code not detected by h5p-resizer.js
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from h5p-php-library.