phpList / phplist3

Fully functional Open Source email marketing manager for creating, sending, integrating, and analysing email campaigns and newsletters.
https://www.phplist.org
GNU Affero General Public License v3.0
752 stars 269 forks source link

Very slow admin pages because of checkForUpdate() #870

Closed mathieumd closed 2 years ago

mathieumd commented 2 years ago

Our private phpList server has no web connection. This makes the checkForUpdate() to awfully slow down every admin pages!

Removing $updateNotif = checkForUpdate(); from admin/index.php L531 does solve the problem, but I think it should be configurable.

You may also want to comment/remove the bloc L539-L541 to get rid of the "Download new version" message box.

bramley commented 2 years ago

You can disable that check by adding/changing this setting in config.php to disable the updater

define('ALLOW_UPDATER', false);

The content of the community news section is usually cached but if the attempt to fetch the url fails then that might be repeated on each load of only the home page.

mathieumd commented 2 years ago

Thanks @bramley! This constant was evaluated a few lines above, I don't know how I could not see it!!

However, it might be nice to also have a similar setting to disable all Internet requests (like news feed, or anything).

michield commented 2 years ago

You may want to consider whitelisting a few URLs/domains. phpList will also check for new translations, top level domains, and without egress, you won' t be able to use send-a-webpage. But I guess those are only on request, and not on every page load.

It will check the community newsfeed once a day: https://github.com/phpList/phplist3/blob/master/public_html/lists/admin/index.php#L647

If you want, you can send a PR to add a flag. Most requests will go through fetchURL: https://github.com/phpList/phplist3/blob/master/public_html/lists/admin/lib.php#L1233