Rex shouldn't die when trying to Rex::Text.base64_encode(nil). It should return an empty string.
git-svn-id: file:///home/svn/framework3/trunk@13817 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
c97fc2c683
commit
b21acdaaae
|
@ -681,14 +681,14 @@ module Text
|
|||
# Base64 encoder
|
||||
#
|
||||
def self.encode_base64(str, delim='')
|
||||
[str].pack("m").gsub(/\s+/, delim)
|
||||
[str.to_s].pack("m").gsub(/\s+/, delim)
|
||||
end
|
||||
|
||||
#
|
||||
# Base64 decoder
|
||||
#
|
||||
def self.decode_base64(str)
|
||||
str.unpack("m")[0]
|
||||
str.to_s.unpack("m")[0]
|
||||
end
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue