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

Add script for removing obsolete records from PES SpamAssassin DB #68

Closed
wants to merge 1 commit into from

Conversation

lgukhman
Copy link
Contributor

No description provided.

@sibprogrammer sibprogrammer self-requested a review November 22, 2024 16:44
@@ -0,0 +1,22 @@
<h1>Remove obsolete entries from Plesk Email Security's SpamAssassin database</h1>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ulgy HTML formatting instead of Markdown doesn't look good.

# Requirements : >php7.4, GNU coreutils
# Version : 1.1
#########
$short_options = "fh";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of code-style violations. Please follow: https://www.php-fig.org/psr/psr-1/ and https://www.php-fig.org/psr/psr-12/

function RemoveRecords($box_id){
//Removing the incorrect records from the SpamFilter table

$r_pref_query = "delete from spamfilter_preferences where spamfilter_id = $box_id";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of potential SQL injections. Prepared statements should be used instead.

@lgukhman lgukhman closed this by deleting the head repository Jan 7, 2025
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

Successfully merging this pull request may close these issues.

2 participants