•  
      request #24157 Displaying document history can crash when the date of a version has been incorrectly set
    Infos
    #24157
    Thomas Gerbet (tgerbet)
    2021-11-24 15:38
    2021-11-19 13:35
    25701
    Details
    Displaying document history can crash when the date of a version has been incorrectly set

    Reproduction steps:

    1. Upload a file into the document manager
    2. Create a new version of the document and set manually the date to something like foo (can be done through SOAP or by manipulating the form)
    3. Display the history of this document

    Trace:

    PHP Fatal error:  Uncaught TypeError: date(): Argument #2 ($timestamp) must be of type ?int, string given in /usr/share/tuleap/src/www/include/utils.php:31
    Stack trace:
    #0 /usr/share/tuleap/src/www/include/utils.php(31): date()
    #1 /usr/share/tuleap/plugins/docman/include/Docman_Log.class.php(164): format_date()
    #2 /usr/share/tuleap/plugins/docman/include/view/Docman_View_ItemDetailsSectionHistory.class.php(51): Docman_Log->fetchLogsForItem()
    #3 /usr/share/tuleap/plugins/docman/include/view/Docman_View_ItemDetails.class.php(67): Docman_View_ItemDetailsSectionHistory->getContent()
    #4 /usr/share/tuleap/plugins/docman/include/view/Docman_View_ItemDetails.class.php(74): Docman_View_ItemDetails->fetch()
    #5 /usr/share/tuleap/plugins/docman/include/view/Docman_View_Details.class.php(131): Docman_View_ItemDetails->display()
    #6 /usr/share/tuleap/plugins/docman/include/view/Docman_View_View.class.php(59): Docman_View_Details->_content()
    #7 /usr/share/tuleap/plugins/docman/include/Docman_Controll
    
    Doc/Documentation manager
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2021-11-24
    Attachments
    Empty
    References

    Follow-ups

    User avatar

    integrated to Tuleap 13.2.99.78


    • Status changed from Under review to Closed
    • Connected artifacts
    • Close date set to 2021-11-24
    User avatar
    Thomas Gerbet (tgerbet)2021-11-23 17:24
    • Summary
      -Displaying document history can crash is the date of a version has been incorrectly set 
      +Displaying document history can crash when the date of a version has been incorrectly set 
    User avatar
    Thomas Gerbet (tgerbet)2021-11-19 13:51

    Patch under review: gerrit #24510.


    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    • Status changed from Under implementation to Under review