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

upgrader: Fix 1.6 banlist corruption on upgrade #869

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/class.filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ function matches($what) {
return false;

foreach ($this->getRules() as $rule) {
if (!isset($how[$rule['h']])) continue;
list($func, $pos, $neg) = $how[$rule['h']];
# TODO: convert $what and $rule['v'] to mb_strtoupper and do
# case-sensitive, binary-safe comparisons. Would be really
Expand Down
2 changes: 1 addition & 1 deletion include/upgrader/streams/core/c00511c7-7be60a84.patch.sql
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ CREATE TABLE `%TABLE_PREFIX%email_filter_rule` (

-- SYSTEM BAN LIST was the first filter created, with ID of '1'
INSERT INTO `%TABLE_PREFIX%email_filter_rule` (`filter_id`, `what`, `how`, `val`)
SELECT LAST_INSERT_ID(), 'email', 'equals', email FROM `%TABLE_PREFIX%email_banlist`;
SELECT LAST_INSERT_ID(), 'email', 'equal', email FROM `%TABLE_PREFIX%email_banlist`;

-- Create table session
DROP TABLE IF EXISTS `%TABLE_PREFIX%session`;
Expand Down