-
Notifications
You must be signed in to change notification settings - Fork 23
Modernization of CDR #53
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
base: release/16.0
Are you sure you want to change the base?
Conversation
|
This appears to be AI-generated and contains multiple potential SQL injection errors. |
|
@chrsmj Can you give me an example just to check? It's just to see if claude is able to fixe it. |
|
No I am not going to debug your AI generated code. |
|
Well. As you like. |
|
Are there any unit tests being added ? |
|
Hey @danardf , just a quick pointer on the SQL injection topic. Check out how $_REQUEST['sort'] is used to build the ORDER BY clause in the new getCdrData function. Directly using request parameters in that part of a query is a common risk. A whitelist for allowed column names is usually the safest approach there. Hope that's a helpful starting point! |
|
@mrpbueno hi |
Interestingly, the current Cdr.class.php has the same SQL injection issues, AI didn't seem to create those Franck just used what already existed. So kudos you just discovered existing SQL injection issues in the CDR module. |
Fixe SQL injections Add unit test
Fixe SQL injections Fixe SQL injections Add unit test
…to modernization-cdr
|
I think it's fixed now |
|
Hi |
|
@kguptasangoma Hi |
|
Hi @danardf did not get chance to look into this one. Needs to kick off the QA also. Thanks |
|
@kguptasangoma Ok update me asap. please. |
|
May be we can ask community help also to test the PR. |
|
As you want. |
|
Hi @danardf,
From the failed request: From the successful request: One more usability note: |
|
@hannes427 Thank you so much fro your feedback. I will try to fixe these issues asap. just need to be free a while. ;) If there is only this kind of issues, That fine.... |
|
@danardf You're welcome! I'm not sure if this is already obvious, but the issue where startdate and from_day/from_month/from_year (and respectively enddate and to_day/to_month/to_year) contain different values also occurs the other way around. If you change the date only under “Advanced Search Options” and not in the “Quick Date Range Picker”, different date values are sent in the request, and not all entries are found. For example, if you set the start date under the Advanced search options to 2021-01-01 and the end date to 2025-10-18 without changing anything under the “Quick Date Range Picker”, the following values are sent via the HTTP request (truncated): You obviously have to enter the desired dates in both fields — that is, under the “Advanced Search Options” and in the “Quick Date Range Picker.” |
I modernized this old module which was ugly for a long time ago. Now it looks better.