Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Presskopp opened this issue May 23, 2023 · 1 comment
Open

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

Presskopp opened this issue May 23, 2023 · 1 comment

Comments

@Presskopp
Copy link

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

@Presskopp
Copy link
Author

2023-05-23 20_11_26-Ticket Graph – WordPress Trac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant