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(jans-orm): throw exception if table in DB is not exists #10096

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Conversation

yurem
Copy link
Contributor

@yurem yurem commented Nov 8, 2024

closes #10094

  • I confirm that there is no impact on the docs due to the code changes in this PR.

@yurem yurem requested a review from yuriyz as a code owner November 8, 2024 18:25
Copy link

dryrunsecurity bot commented Nov 8, 2024

DryRun Security Summary

The pull request focuses on improving the robustness and security of the SqlFilterConverter class by adding a check to ensure that the columTypes map in the TableMapping object is not null before accessing it, which helps prevent potential NullPointerException errors and improves the overall security and stability of the application.

Expand for full summary

Summary:

The code change in this pull request is focused on improving the robustness and security of the SqlFilterConverter class, which is responsible for converting LDAP filters to SQL filters. The key change is the addition of a check to ensure that the columTypes map in the TableMapping object is not null before attempting to access it.

This is an important security enhancement, as accessing a null map could lead to a NullPointerException and potentially cause unexpected behavior or application crashes. By adding this check, the code becomes more resilient and less prone to errors, which can help improve the overall security and stability of the application. Handling potential null values and edge cases is a best practice in secure coding, as it can help prevent security vulnerabilities and improve the overall quality of the codebase.

Files Changed:

  • jans-orm/sql/src/main/java/io/jans/orm/sql/impl/SqlFilterConverter.java: This file contains the SqlFilterConverter class, which is responsible for converting LDAP filters to SQL filters. The change in this pull request adds a check to ensure that the columTypes map in the TableMapping object is not null before accessing it. This is an important security enhancement that helps prevent potential NullPointerException errors and improves the overall robustness of the code.

Code Analysis

We ran 9 analyzers against 1 file and 0 analyzers had findings. 9 analyzers had no findings.

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

@mo-auto mo-auto added comp-jans-orm Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality labels Nov 8, 2024
@yuremm yuremm enabled auto-merge (squash) November 8, 2024 18:27
@yuremm yuremm merged commit 595e0c3 into main Nov 8, 2024
12 of 13 checks passed
@yuremm yuremm deleted the issue_10094 branch November 8, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-orm Component affected by issue or PR kind-bug Issue or PR is a bug in existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(jans-orm): cleaner timer fails during clean up for Postgres
4 participants