Scirra / Construct-bugs

Public bug report submissions for Construct 3 and Construct Animate. Please read the guidelines then click the 'Issues' tab to get started.
https://www.construct.net
107 stars 83 forks source link

Add support for remote URL dependency scripts #675

Closed Psychokiller1888 closed 7 years ago

Psychokiller1888 commented 7 years ago

Problem description

Hello!

Thank for r48 adding file dependency. It works well! The only problem is we cannot include external script, or distant scripts, from the internet. When exporting, C3 fails saying the file is not found.

Why I want this? Because that way we can have the plugin include an always up-to-date API somewhere on the internet rater than have a manually copied local file that might be deprecated

AshleyScirra commented 7 years ago

This is by design for security reasons. Construct 3 deliberately blocks access to third-party origins, since this entirely prevents the chance that malicious scripts could steal people's work or login details by posting it to a third-party server. This is far too much of a risk to lift just because of addon bundling. Besides loading directly from the web would cause dependency hell (you never know when you get updated and can't ever roll back) and prevents working offline.

I've updated the SDK docs to clarify the file must be local.

Psychokiller1888 commented 7 years ago

So it's normal that C3 miserably fails with an error if we specify a url as plugin dependency? That a good idea on how to brake C3... Beside, including ext script was working in C2.... We are not talking of including a distant script in a running C3 editor, we are talking of exported games including distant APIs.... For me it's not a problem, I already setup a batch that mods the export to add the distant API....

AshleyScirra commented 7 years ago

I thought you wanted C3 to pull in the URL when you export. Do you just want to add a script tag with a URL to the exported index.html? If so you don't need the dependency system, just create a script tag when your runtime script loads.

Psychokiller1888 commented 7 years ago

No. Technically I want what C2 was doing: Specifying a dependency. As you did on C3, it adds a Githubissues.

  • Githubissues is a development platform for aggregating issues.