]> granicus.if.org Git - pdns/commitdiff
silently skip embedded spaces in base64.. ISC & NSD add these.
authorBert Hubert <bert.hubert@netherlabs.nl>
Sun, 25 Mar 2012 16:15:17 +0000 (16:15 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sun, 25 Mar 2012 16:15:17 +0000 (16:15 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2536 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/base64.cc

index 9efb7c00b9e6943e2870772eea4a9cc63eb5c568..b3712d18e1b0f08ab0267291a2b7c801e152079e 100644 (file)
@@ -124,7 +124,8 @@ int B64Decode(const std::string& strInput, std::string& strOutput)
         // Decode a character
        if(strInput.at(iInNum)=='=')
          pad++;
-
+        while(isspace(strInput.at(iInNum)))
+          iInNum++;
         cChar = B64Decode1(strInput.at(iInNum++));
 
       } // if