Clojure

ns defmacro allows arbitrary execution of clojure.core fns

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: Release 1.2, Release 1.3, Release 1.4
  • Fix Version/s: Release 1.9
  • Component/s: None
  • Labels:
  • Environment:
    all
  • Patch:
    Code
  • Approval:
    Ok

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.

Activity

Craig Brozefsky made changes -
Field Original Value New Value
Attachment ns-patch.diff [ 11395 ]
Craig Brozefsky made changes -
Attachment ns-patch.diff [ 11412 ]
Alex Miller made changes -
Approval Triaged [ 10120 ]
Labels error-reporting
Alex Miller made changes -
Approval Triaged [ 10120 ] Ok [ 10007 ]
Fix Version/s Release 1.9 [ 10750 ]
Alex Miller made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]

People

Vote (4)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: