Skip to content

Ticketgraph lets you enter a much too high number of days #12

@Presskopp

Description

@Presskopp

The ticketgraph will show the last 90 days by default which is perfectly fine. But you are able to enter bigger numbers like 10000. In my test I could not go further than 738632 on https://core.trac.wordpress.org/ticketgraph?days=738632. Amazing to see the bunch of closed tickets around the year 200! I'd expect the graph to simply show all he has instead of going back in time, if you enter numbers like these.

Regarding Ticket: https://core.trac.wordpress.org/ticket/58388

They told me to come here.

Looks like this can easily be patched around
\ticketgraph\ticketgraph.py, L. 98

days_back = req.args.getint('days', self.default_daysback)

by something like

max_days_back = 3000  # Maximum number of days allowed

days_back = req.args.getint('days', self.default_daysback)

if days_back > max_days_back:
    days_back = max_days_back

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions