Skip to content

Fix the thorrtler whitelist bitmask - #14149

Merged
rullzer merged 1 commit into
masterfrom
fix/throttler_bitmask
Feb 12, 2019
Merged

Fix the thorrtler whitelist bitmask#14149
rullzer merged 1 commit into
masterfrom
fix/throttler_bitmask

Conversation

@rullzer

Copy link
Copy Markdown
Member

Before we actually didn't check each bit of the bitmask. Now we do.

Testing is easy. Just try to run the added testcases without this patch.

Before we actually didn't check each bit of the bitmask. Now we do.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
$bitmask = 1 << (7 - ($i % 8));

$part = $part & $bitmask;
$orig = $orig & $bitmask;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

$part &= $bitmask; and $orig &= $bitmask; would also work but is hard to read.

@ChristophWurstChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🐘

@rullzer
rullzer merged commit 004f7fa into masterFeb 12, 2019
@rullzer
rullzer deleted the fix/throttler_bitmask branch February 12, 2019 07:54
@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable15

@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable14

@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable15 in #14151

@backportbot-nextcloud

Copy link
Copy Markdown

backport to stable14 in #14152

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@rullzer@ChristophWurst@kesselb