•  
      request #26398 Rename user: database existence is not check before changes
    Infos
    #26398
    Lorentz Romain (lorentzr)
    2022-04-20 16:31
    2022-04-19 15:39
    27927
    Details
    Rename user: database existence is not check before changes

    Database existence is not check before user renaming. It can throw an error if it doesn't exist :

    PHP Fatal error:  Uncaught Error: Call to a member function count() on bool in /usr/share/tuleap/src/common/dao/include/DataAccessObject.class.php:154
    Stack trace:
    #0 /usr/share/tuleap/plugins/mediawiki/include/MediawikiDao.class.php(199): DataAccessObject->retrieveCount()
    #1 /usr/share/tuleap/plugins/mediawiki/include/MediawikiDao.class.php(170): MediawikiDao->UserNameAlreadyExist()
    #2 /usr/share/tuleap/plugins/mediawiki/include/mediawikiPlugin.php(538): MediawikiDao->renameUser()
    #3 /usr/share/tuleap/src/common/Event/EventManager.class.php(127): MediaWikiPlugin->systemevent_user_rename()
    #4 /usr/share/tuleap/src/common/Plugin/PluginLoader.php(73): EventManager->eventManagerDispatch()
    #5 /usr/share/tuleap/src/common/Event/EventManager.class.php(116): Tuleap\Plugin\PluginLoader->Tuleap\Plugin\{closure}()
    #6 /usr/share/tuleap/src/common/Event/EventManager.class.php(104): EventManager->processEventOnListener()
    #7 /usr/share/tuleap/src/common/system_event/include/SystemEvent_USER_RENAME.class.php(115): EventManager->processEvent()
    #8 /usr/share/tuleap/src/utils/rename_incremented_users.php(244): SystemEvent_USER_RENAME->process()
    #9 /usr/share/tuleap/src/utils/rename_incremented_users.php(227): executeSystemEvent()
    #10 /usr/share/tuleap/src/utils/rename_incremented_users.php(200): updateUser()
    #11 /usr/share/tuleap/src/utils/rename_incremented_users.php(98): renameAllUsers()

     

    Mediawiki
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Lorentz Romain (lorentzr)
    Closed
    2022-04-20
    Attachments
    Empty
    References

    Follow-ups

    User avatar

    Integrated in Tuleap 13.7.99.193


    • Status changed from Under review to Closed
    • Connected artifacts
    • Close date set to 2022-04-20