Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-3225

tobinary should throw error when 1st arg is invalid

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.2.1.008
    • Fix Version/s: 4.3.0.000, 4.2.2.002
    • Labels:
      None
    • Environment:

      Railo 4.2, Apache, Tomcat, Centos 6 (64 bit)

    • Steps to Reproduce:
      Hide

      <cfoutput>
      #tobinary("ABC 123")#
      </cfoutput>

      Show
      <cfoutput> #tobinary("ABC 123")# </cfoutput>

      Description

      Consider this code:

      <cfoutput>
      #tobinary("ABC 123")#
      </cfoutput>

      The Railo docs say for the 1st argument:

      A variable representing data in Base64-encoded format or a PDF document.

      Running that on ACF 9 results in:

      The parameter 1 of function ToBinary, which is now ABC 123 must be a base-64 encoded string.

      Running it on Railo 4.2 doesn't error and returns a string (the characters aren't printable so can't output it but you can run that code on cflive.net to see the result)

      I would expect it to throw an error as the passed in value is not a Base64-encoded string or PDF document.

      Originally raised on the mailing list:
      https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/railo/N_rWhamGqjc/bSFO5MX-UvoJ

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                micstriit Michael Offner
                Reporter:
                aliaspooryorik John Whish
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: