Artifacts Associated With Ticket 1028587
Ticket change [b8dc261b37] (rid 129033) by dgp on 2004-09-15 14:24:36:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
% proc foo {} {puts foo} % namespace export foo % namespace eval ns namespace import ::foo % ns::foo foo % interp hide {} foo % foo invalid command name "foo" % ns::foo foo This means that a "safe" interp can have the means to access hidden commands. Ability to hide commands it what makes a safe interp safe. - foundin initialized to: "obsolete: 8.4.7"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "45. Parsing and Eval"
- title initialized to: "import exposes hidden command"
- type initialized to: "Bug"
Ticket change [6a15958149] (rid 128086) by msofer on 2004-09-16 21:36:30:
- icomment:
Logged In: YES user_id=148712 To insure the safety of the interp you have to hide unsafe commands *before* running any potentially unsafe script. It is useless to close the barn door after the horses fled ;) % proc foo {} {puts foo} % namespace export foo % interp hide {} foo % namespace eval ns namespace import ::foo % ns::foo invalid command name "ns::foo" The bug (is it one?) is then that you cannot completely hide a command after it was exposed. Consider a different example, pushing the argument to the extreme % proc newProc [info args oldProc] [info body oldProc] % interp hide {} oldProc - login: "msofer"
- mimetype: "text/plain"
- title changed to: "[interp hide] leaves pre-existing imports exposed"
- username: "msofer"
- icomment:
Ticket change [f18491fda1] (rid 109375) by dgp on 2004-09-16 21:42:02:
- icomment:
Logged In: YES user_id=80530 I can accept a judgment of "not a bug". There is a difference with your conterexample, though. The hiding of a command in most respects looks like the deletion of the command. It's just not there anymore. Deleting a command also deletes all of its imports. However, (inconsistently, I allege), hiding a command fails to hide all of its imports. Instead the imports still refer to a spooky half-existing command that still runs.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [3bcaa7a113] (rid 112806) by dkf on 2004-09-16 23:07:20:
- icomment:
Logged In: YES user_id=79902 The bug is the funky way that [namespace import] works...
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [66e5884b04] (rid 102811) by msofer on 2006-10-01 02:33:28:
- closedate changed to: "2006-09-30T19:33:28"
- closer changed to: "msofer"
- resolution changed to: "Invalid"
- status changed to: "Pending"
Ticket change [64912f1645] (rid 92792) by sf-robot on 2006-10-15 09:20:08:
- closedate changed to: "2006-10-15T02:20:08"
- closer changed to: "sf-robot"
- icomment:
Logged In: YES user_id=1312539 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"