VNOI-Admin / OJ

A modern open-source online judge and contest platform system.
https://oj.vnoi.info
GNU Affero General Public License v3.0
153 stars 67 forks source link

Increase max length of Comment.page field from 30 to 32 characters. #393

Closed R2th closed 2 months ago

R2th commented 3 months ago

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Please remove options that are not relevant Type of change: bug fix, new feature, refactor, or something else?

What

What does the PR do?

Why

Why this PR is needed?

Fixes # (issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

By submitting this pull request, I confirm that my contribution is made under the terms of the AGPL-3.0 License.

hieplpvip commented 3 months ago

Why only 32? Increasing 30 to 32 only adds 2 characters

R2th commented 3 months ago

@hieplpvip because the limit page was 30 while the contest code is 32 so requests like this will fail Image 1582x542

hieplpvip commented 3 months ago

Ok, I can say for sure that 32 is not enough. The reason is that the contest key is prepended with c: to form the associated page (see get_comment_page). I've checked all get_comment_page definitions. 34 is good.

Please also increase the limit for CommentLock.