Giter Club home page Giter Club logo

Comments (28)

davericher avatar davericher commented on July 19, 2024 1

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.

falcon-git avatar falcon-git commented on July 19, 2024 1

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.

mikkorantalainen avatar mikkorantalainen commented on July 19, 2024 1

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.

ramonziai avatar ramonziai commented on July 19, 2024 1

@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.

falcon-git avatar falcon-git commented on July 19, 2024

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.

xavidp avatar xavidp commented on July 19, 2024

Hi

We are using this library:
"HTML Purifier"
https://doc.tiki.org/Purifier

See: http://htmlpurifier.org

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.

falcon-git avatar falcon-git commented on July 19, 2024

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.

jonnybradley avatar jonnybradley commented on July 19, 2024

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.

falcon-git avatar falcon-git commented on July 19, 2024

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.

davericher avatar davericher commented on July 19, 2024

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.

falcon-git avatar falcon-git commented on July 19, 2024

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.

davericher avatar davericher commented on July 19, 2024

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.

falcon-git avatar falcon-git commented on July 19, 2024

Yes, you are right, it takes in "white lists" for style patterns and tags.

from h5p-php-library.

xarhs-ep avatar xarhs-ep commented on July 19, 2024

hi @falcon-git. Is there any progress with this issue?

from h5p-php-library.

falcon-git avatar falcon-git commented on July 19, 2024

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.

xarhs-ep avatar xarhs-ep commented on July 19, 2024

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.

pvenakis avatar pvenakis commented on July 19, 2024

Hello @falcon-git, are there any news with regards to removing the GPL'd code from H5P?

from h5p-php-library.

osimakoff avatar osimakoff commented on July 19, 2024

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.

hrieke avatar hrieke commented on July 19, 2024

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.

mandadimuralidharreddy avatar mandadimuralidharreddy commented on July 19, 2024

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.

ramonziai avatar ramonziai commented on July 19, 2024

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.

ramonziai avatar ramonziai commented on July 19, 2024

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.

sr258 avatar sr258 commented on July 19, 2024

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.

sr258 avatar sr258 commented on July 19, 2024

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.

mikkorantalainen avatar mikkorantalainen commented on July 19, 2024

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.

mikkorantalainen avatar mikkorantalainen commented on July 19, 2024

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.

sr258 avatar sr258 commented on July 19, 2024

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.

otacke avatar otacke commented on July 19, 2024

@sr258 Joubel has already received carte blanche from me :-)

from h5p-php-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.