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

FIX : FATAL ERROR abusively triggered due to incomplete regex #31052

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

thersane-john
Copy link
Contributor

@thersane-john thersane-john commented Sep 20, 2024

FIX

FATAL ERROR abusively triggered due to incomplete regex

SELECT [...] WHERE [...] LIMIT 50 OK
SELECT [...] WHERE [...] LIMIT 50 FAIL
SELECT [...] WHERE [...] LIMIT 50 ; FAIL
SELECT [...] WHERE [...] LIMIT 25,50; FAIL
SELECT [...] WHERE [...] LIMIT 25,50 FAIL

After:

SELECT [...] WHERE [...] LIMIT 50 OK
SELECT [...] WHERE [...] LIMIT 50 OK
SELECT [...] WHERE [...] LIMIT 50 ; OK
SELECT [...] WHERE [...] LIMIT 25,50; OK
SELECT [...] WHERE [...] LIMIT 25,50 OK
SELECT [...] WHERE [...] LIMIT FAIL
SELECT [...] WHERE [...] FAIL

@thersane-john thersane-john changed the base branch from develop to 20.0 September 20, 2024 07:27
@thersane-john thersane-john changed the title FIX : FATAL ERROR abusively triggered due to imcomplete regex FIX : FATAL ERROR abusively triggered due to incomplete regex Sep 20, 2024
@eldy
Copy link
Member

eldy commented Sep 23, 2024

SELECT [...] WHERE [...] LIMIT 25,50; is a wrong syntax. A limit accept only an int parameter.
So it should fails like it does currently.
Only the addition of ;? seems good to me.

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Sep 23, 2024
@hregis
Copy link
Contributor

hregis commented Sep 23, 2024

SELECT [...] WHERE [...] LIMIT 25,50; is a wrong syntax. A limit accept only an int parameter. So it should fails like it does currently. Only the addition of ;? seems good to me.

@eldy you can use :

LIMIT offset, row_count;

or

LIMIT row_count OFFSET offset

@thersane-john
Copy link
Contributor Author

thersane-john commented Sep 23, 2024

Add OFFSET
image

@eldy eldy merged commit 25754d8 into Dolibarr:20.0 Sep 26, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants