Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
constant_time_encoding
Commits
c9141c24
Commit
c9141c24
authored
2 years ago
by
Paragon Initiative Enterprises
Browse files
Options
Download
Patches
Plain Diff
Fix canonical padding.
parent
74e31511
master
v2.6.3
v2.6.2
v2.6.1
v2.6.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Base64.php
+6
-0
src/Base64.php
with
6 additions
and
0 deletions
+6
-0
src/Base64.php
+
6
−
0
View file @
c9141c24
...
@@ -189,6 +189,9 @@ abstract class Base64 implements EncoderInterface
...
@@ -189,6 +189,9 @@ abstract class Base64 implements EncoderInterface
(((
$c1
<<
4
)
|
(
$c2
>>
2
))
&
0xff
)
(((
$c1
<<
4
)
|
(
$c2
>>
2
))
&
0xff
)
);
);
$err
|=
(
$c0
|
$c1
|
$c2
)
>>
8
;
$err
|=
(
$c0
|
$c1
|
$c2
)
>>
8
;
if
(
$strictPadding
)
{
$err
|=
(
$c2
<<
6
)
&
0xff
;
}
}
elseif
(
$i
+
1
<
$srcLen
)
{
}
elseif
(
$i
+
1
<
$srcLen
)
{
$c1
=
static
::
decode6Bits
(
$chunk
[
2
]);
$c1
=
static
::
decode6Bits
(
$chunk
[
2
]);
$dest
.
=
\
pack
(
$dest
.
=
\
pack
(
...
@@ -196,6 +199,9 @@ abstract class Base64 implements EncoderInterface
...
@@ -196,6 +199,9 @@ abstract class Base64 implements EncoderInterface
(((
$c0
<<
2
)
|
(
$c1
>>
4
))
&
0xff
)
(((
$c0
<<
2
)
|
(
$c1
>>
4
))
&
0xff
)
);
);
$err
|=
(
$c0
|
$c1
)
>>
8
;
$err
|=
(
$c0
|
$c1
)
>>
8
;
if
(
$strictPadding
)
{
$err
|=
(
$c1
<<
4
)
&
0xff
;
}
}
elseif
(
$strictPadding
)
{
}
elseif
(
$strictPadding
)
{
$err
|=
1
;
$err
|=
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets