Skip to content

Commit 93ddceb

Browse files
committed
Land rapid7#19419, Remove unneeded code in php/base64
This remove some useless code in modules/encoders/php/base64.rb
2 parents 1ffb0b1 + 656c8fd commit 93ddceb

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

modules/encoders/php/base64.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ def encode_block(state, buf)
7171
# raw string, so strip it off.
7272
b64.gsub!(/[=\n]+/, '')
7373

74-
# The first character must not be a non-alpha character or PHP chokes.
75-
i = 0
76-
b64[i] = "chr(#{b64[i]})." while (b64[i].chr =~ %r{[0-9/+]})
77-
7874
# Similarly, when we separate large payloads into chunks to avoid the
7975
# 998-byte problem mentioned above, we have to make sure that the first
8076
# character of each chunk is an alpha character. This simple algorithm

0 commit comments

Comments
 (0)