Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: an option to disable polyfill.min.js.php #5

Open
tushev opened this issue Mar 3, 2023 · 4 comments
Open

Feature request: an option to disable polyfill.min.js.php #5

tushev opened this issue Mar 3, 2023 · 4 comments
Assignees

Comments

@tushev
Copy link

tushev commented Mar 3, 2023

On offline systems, or systems with limited connectivity, a request to polyfill.min.js.php leads to a very long response - because the file tries to contact polyfill.io domain and waits until timeout (bc firewall restricts the connectivity).

I would like to have an option either to disable this completely (=returning blank js), or stick to the version shipped with distro.

Currently I'm circumventing this by adding exit(); at the beginning of the file, this makes updates inconvenient as you have to resolve conflicts manually (I'm using git pull).

@danielmarschall
Copy link
Owner

Thank you for your suggestion and your continued support to OIDplus!

I am thinking about a "offline mode" base-configuration setting which could disable more than just the polyfill. After all, if a plugin needs Internet access, then I think an error message telling the user that OIDplus is in Offline-Mode is more friendly than weird Exceptions because an internal connection timeout happened.

These are all occurrences of url_get_contents (for GET requests) and CURLOPT_URL (for POST requests):

  • Disable Recaptcha and HCaptcha plugin
  • Disable GS1 Online Barcode
  • Disable Online Software Update and VNag Version Check plugin (since they contact the ViaThinkSoft server to get the last version)
  • Disable the "System File Check" plugin (since it contacts the ViaThinkSoft server to get the latest checksums)
  • Disable the System Registration plugin
  • Disable the "Nostalgia" plugin (because it downloads the EXE files from GitHub), or at least don't include the EXE files, only the data files
  • Disable parts of the OID Info Export plugin, because it might contact reg2 query (if data is downloaded from oid-info.com)
  • Disable Google and Facebook OAuth
  • Disable polyfill.min.js.php

So these should be all Internet access possibilities.

What do you think?

@danielmarschall danielmarschall self-assigned this Mar 28, 2023
@tushev
Copy link
Author

tushev commented Mar 29, 2023

@danielmarschall Yeah, I think this would be much better. After all, some people may prefer running an offline instance due to personal preferences or workplace requirements. Having an option to disable all communications (as in case with System Registration) would be great. Thanks!

@danielmarschall
Copy link
Owner

danielmarschall commented Apr 8, 2023

The latest version svn-1182 (gets released in approx 1 hour) introduces the following base configuration setting:

OIDplus::baseConfig()->setValue('OFFLINE_MODE', false);

It will disable the methods url_get_contents() and url_post_contents(), so that an Internet access is impossible, even if the plugin author missed to check for url_get_contents_available() and url_post_contents_available(), respectively.

Please notify me in case something doesn't work as expected, since this change affects a lot of things. Thanks!

@tushev
Copy link
Author

tushev commented Apr 8, 2023

@danielmarschall Thank you very much!!

Well, at the first glance everything's OK, and the pages load almost instantly on offline system.

The only thing missing is local version on Software update page (it says Local installation: unknown).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants