Skip to content

Commit

Permalink
Merge pull request USArmyResearchLab#35 from drewbrew/support-dos-eol
Browse files Browse the repository at this point in the history
support DOS/Unix line endings in decode_base64()
  • Loading branch information
wglodek committed Feb 10, 2015
2 parents 3744b58 + 83139d4 commit 0e1dbb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def decode_base64(intext, alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqr

outtext = ''

intext = intext.rstrip('\n')
# support DOS and Unix line endings
intext = intext.rstrip('\r\n')

i = 0
while i < len(intext) - 3:
Expand Down

0 comments on commit 0e1dbb1

Please sign in to comment.