Uploaded image for project: 'Clojure'
  1. CLJ-1029

ns defmacro allows arbitrary execution of clojure.core fns

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Completed
    • Affects versions: Release 1.4, Release 1.3, Release 1.2
    • Fix versions: Release 1.9
    • Labels:
    • Environment:

      all

    • Approval:
      Ok
    • Patch:
      Code

      Description

      The form:

      (ns foo (:print "I AM A ROBOT"))

      will print "I AM A ROBOT"

      This is because the defmacro takes the name of the first element of the reference, looks it up in the clojure.core namespace and invokes it on the rest of the args.

      This is minor, but it does mean that an otherwise declarative form is not executing code.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              craigbrozefsky Craig Brozefsky
            • Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: