uploading H5P content

Not able to upload premade H5P activities to H5P.org. Using Chrome browser.  After choosing activity and then "Use", the file appears to upload and I get the message "Interactive Video was successfully uploaded" or "Course Presentation was successfully uploaded" - but then the message shows: "Loading, please wait...." - and unfortunately nothing gets loaded - the "wheel" just spins.

 

BV52's picture

Hi cdoige,

Would you mind uploading your content on this thread.

-BV

Here is an example of H5P content not loading - but I tried many other file types with no success.

Here is an example of H5P content not loading - but I tried many other file types with no success.

same issue here as mentioned above. all h5p files "was successfuly uploaded" but "Loading" is taking forever. The issue is since about 5 days. 

Here is an example of content that would not load - but I actually I tried multiple H5P file types and had the same problem.

BV52's picture

Hi All,

Thank you for the sample contents. Here is what I found out so far. I can reproduce the issue using the sample contents. I can successfully upload both contents in H5P.com and when I download those contents then upload it in H5P.org I do not get the issue.

https://h5p.org/node/1390697

https://h5p.org/node/1390701

This means that the issue is not specific to the file nor a constant issue in H5P.org. It is a combination of the downloaded file and uploading in H5P.org as uploading in H5P.com seems to "fix" it. Where did you create this content? If you are using the H5P plugin please include the version.

-BV

Hello, I'm having a similar issue. 

I'm trying to find a way to copy my H5P content from one WordPress account to another. I use the Reuse button and download the content as an H5P file. When I upload it on my second site, I get this error. 

H5P Upload Error

Validating h5p package failed.

File "content/config.bak.php" not allowed. Only files with the following extensions are allowed: json png jpg jpeg gif webm mp4 ogg mp3 m4a wav vtt webvtt txt gltf glb-allowed.Get help

File "content/wp-1ogin_bak.php" not allowed. Only files with the following extensions are allowed: json png jpg jpeg gif webm mp4 ogg mp3 m4a wav vtt webvtt txt gltf glb-allowed.Get help

File "content/wpconfig.bak.php" not allowed. Only files with the following extensions are allowed: json png jpg jpeg gif webm mp4 ogg mp3 m4a wav vtt webvtt txt gltf glb-allowed.Get help

 

When I tried the same using the samples available at h5p.org, the uplaod went smoothly and I did not receive any error. 

I tried the workaround you mentioned but I'm geting the same error when I'm uploading to H5P.com. And when I'm uploading to H5P.org, the upload keeps loading and nothing happens. 

I would really appreciate any advice as I have about 100 activities to move from one site to another.

I'm also not sure if this is an H5P related error or it has to do with the security of WordPress. 

H5P Plugin version: Version 1.15.6

otacke's picture

This is not an issue with H5P. Some malware has found its way onto your WordPress site.

H5P does not allow PHP files inside content files for a reason, and here's a perfect example why. Your site has been infected with malware, and it is trying to spread by seemingly putting its malicious code into downloads from the page. Is that why you want to move H5P content?

You would need to clean up the infection first before moving the content, or you will need to clean up every H5P file that you download from your page (the log.txt file also belongs to the malware).

@BV H5P does not upload that content, so that malicious code should not find its way on other systems, but I suggest you remove the attachment from the post nevertheless.

otacke's picture

If you need some more info on how dangerous the malware is: If it gets installed on a WordPress site (it hopes to override the wp-config.php file, it will appear to the site host that WordPress is "just" broken, but it will also allow the attacker to read and download any file that is on your site and to also upload files. Presumably, after that, some default wp-config.php file will be installed, so the site works again. It could then do virtually anything (including injecting its files into downloads of all kinds as you noticed) and you might not even be aware of it ...

The attacker, in the end, will have installed a custom tool (in Chinese) to work with including PHP code execution, accessing the database, port scanning on the server in order to find other attack vectors, a GUI file manager, investigating your server configuration.

Thanks @otacke for the detailed explanation. What you are saying makes a lot of sense, as the website was infected and we are moving all the content. I was trying to find a work around copying the H5P content as it is what took as the longest to create. Do you think there is a way to remove the infected files from each H5P and then upload it to the new site? 

Also, I have tried with one of the files and I was able to upload it to h5p.com and then to the new site. Do you think this is risky? 

Any advice is highly appreciated. 

otacke's picture

I don't think that H5P.com will be impacted, but knowingly uploading files that contain malicious code somewhere is reckless! What were you thinking? Please never ever do this again!

H5P files are merely zip files, so you can remove files. You should ar least delete all PHP files and the log.txt file, and on top you should ensure that there's no other file that doesn't belong there - and ideally also check the remaining files to be sure.

Best,

Oliver 

BV52's picture

Hi Oliver,

Thanks for the hint. That explains why my Chrome won't download the file. I actually had to use my old laptop which probably does not have the security features to detect the malicious code.

-BV

Thank you for checking on this.  I am also able to "fix" the problem by uploading into H5P.com and then downloading.  I am sorry - but I don't know the version of H5P I am using other then it is the one associated with the Content Bank in Moodle 3.9.  I have made many H5P activities this way and have had no trouble in the past uploading my activities to H5P.org.

Thanks

BV52's picture

Hi cdoige,

I'm glad that the workaround worked for you and thank you for the additional information.

-BV

Hi, whether it's made with h5p.org or Lumi - it's only working with new files, created a few days ago. There's a problem uploading files made with h5p.org month ago - I've made some in the end of March, downloaded them on my drive and then trying to upload them back on .org - they are not loading as a preview as I mentioned above. Same thing happens with the files created a month ago with Lumi. 

otacke's picture

Hi!

The problem most likely propblem is that the H5P integration for Drupal (which is running on h5p.org) has not been updated in ages. It still uses a version of H5P core that contains a bug. That version does not clean up the list of loaded files and causes H5P to not realize it has already loaded everything. It does not kick in when content is created, but when one creates content and then decides to change the content type - and probably also when content is uploaded and needs to be upgraded to a later library version that is already available on the platform. I have not checked that in detail, but it would explain the symptoms at least. Uploading to H5P.com will update the content to the later library version of Interactive Video there and downloading will then put that later version into the file, so no upgrading is required when then uploading it to H5P.org (or some other Drupal site).

That bug was fixed in February 2022. It's neither on H5P.com nor on the latest version of the moodle plugin, because those use a version of H5P core that was already fixed. It's not on the WordPress plugin, because there the version of H5P core is even older and does not yet contain the bug.

So, technically all that is required should be to eventually update the Drupal plugin(s) to use a version of H5P core that does not contain the bug.

Cheers,
Oliver

BV52's picture

Hi Oliver,

Thanks for the detailed explanation. I will reach out to the dev team in the hopes of getting this sorted out.

-BV

BV52's picture

Hi 35007,

Thank you for the additional information. I think Oliver may ahve explained the reason and have suggested a resolution. I will reach out to the dev team for assistance. 

On a side note, I'm curious you mentioned that you made some contents in H5P.org in the end of March. This is puzzling since your H5P.org account is only 2 days old.

-BV

Thanks, BV.

I'm using second account - one on my surface pro, one on my phone cuz didn't remember the login.

otacke's picture

Hi!

I just checked and my assumption about the cause of the bug is correct. It is caused by not deleting the list of already loaded libraries and the patch that was created in February 2022 fixes the issue. Eventually, the version of H5P core that is provided by the different H5P integrations should be updated.

Best,
Oliver

Hi Oliver and BV - thank you for your work on this - I have passed on this info to my IT administrator.

Best wishes,

Carl

KTaylor3117's picture

I am having an issue with my h5p Moodle plug in.  I am running Moodle 4.1 and when I try to load interactive video or presentation I get the loading please wait just stuck there.   I did upgrade the content bank for interactive video it is 1.26 but my editor libraries are 1.22.7; 1.24.1; 1.25.4 should they be deleted? I get no errors just it struck like its trying to retrieve information and doesn't progress.  Any assistance would be greatly appreciated. 

Based on other threads I have researched I had my IT department check DB and this was their response:

We use a user called moodle_user to run mysql for our moodle instance and it has full grant permissions:

GRANT ALL PRIVILEGES ON moodle_sage.* TO moodle_user@localhost

 

Thank you in advance for your assistance.

 

 

 

Dr.D.S.Perdue's picture

I am having the same issue today (2023.8.11) and wondered if there was a fix I should know about or how I can resolve this?
otacke's picture

Hi!

Yes, there is a fix (and has been since February 2022). I described the problem at https://h5p.org/comment/49368#comment-49368 but so far the H5P core team has not taken any action. They would need to update the H5P plugins for Drupal and WordPress to include the latest version of H5P core, but have not done so for a very long time - something I am very sorry to say I quite frankly do not understand.

Best,
Oliver