Giter VIP home page Giter VIP logo

phpbb-ext-versionchecknotifier's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

phpbb-ext-versionchecknotifier's Issues

Older PHP Versions don't ship gmp functions

PHP 5.3 and possibly other PHP Versions don't ship gmp functions, therefore the notifications can't be created.

Maybe replace by bcmath? Otherwise, another bignumber lib is necessary.

sqlite3 tests time out

The Tests for sqlite3 time out and thereby cause phpunit to error. If run locally, the same error as here is encountered:

  1. gn36\hookup\tests\functional\redirector_test::test_call_redirect
    Guzzle\Http\Exception\CurlException: [curl] 28: Operation timed out after 30032 milliseconds with 0 bytes received [url] app.php/versionchecknotifier/redirect/1?sid=ec

The same test being run by itself works fine in the same environment.

Potentially a cross testing effect between multiple functional tests? The test runs a whole 2.9 minutes by itself, while all tests together take only 3.17 minutes.

Incorrect calculation of notification id leads to duplicate entries

This error causes https://www.phpbb.com/customise/db/extension/versionchecknotifier/support/topic/167836?p=519861#p519861

The static function get_notification_id calculates the id incorrectly.

  1. It uses ext_name instead of name
  2. The version information provided by the cronjob is actually an array. The version information stored, however, is only a string. Depending on what is provided, the information differs and therefore the id is calculated differently (including a suppresed error notice of array to string conversion).

Multiple possible solutions:

  1. Calculate ID using internal static function to find the correct new version (slow, seems to cause issues with unittests, yields same ID every call)
  2. simply use a serialized version of the complete array for ID calculation (simple, but has the same problem of different ids)
  3. Move version extraction to cronjob / helper class (should simplify id calculation in notification, yields the same id on every call)

If the same ID is given on every call this is correct behavior. But it changes the behavior of this extension since right now, administrators are reminded frequently about the same outdated extension. So this should be corrected, but maybe it would be best to remark the notification as unread or delete and reapply it. Maybe this can also be used as a basis for a user defined setting on how frequently he wishes to be notified.

Class phpbb\language\language must be used for notifications / Notification adjustments

The constructor has changed and must be adjusted. Other changes from phpBB.com Notes:

Notifications (3.2 only)
If your extension uses the notifications system by extending the notifications class, then you should take a look at how the notifications classes have changed for 3.2. The notable changes are made to the find_users_for_notification and create_insert_array methods.

public function find_users_for_notification($data, $options = array())
{
    ...
    // phpBB 3.1 usage:
    $users[$row['user_id']] = array('');

   // phpBB 3.2 usage:
    $users[$row['user_id']] = $this->notification_manager->get_default_methods();
    ...
} 
public function create_insert_array($data, $pre_create_data = array())
{
    ...
    // phpBB 3.1 usage:
    return parent::create_insert_array($data, $pre_create_data);

   // phpBB 3.2 usage:
    parent::create_insert_array($data, $pre_create_data);
} 

Redirect is insecure

When redirecting to an extension download from a new notification, phpBB fails the redirect with an error.

The redirect may need to be carried out differently with an intermediate page inbetween.

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.