Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e982191a65db6bc83e6930566708206c6f226695887a8b27dacdf1506b43030b
Ticket: 016bea8571bfe22d30ce150e63c5bccdbfee2e5e
Simplify case analysis in safe::AliasGlob
User & Date: kjnash on 2020-07-18 18:11:39
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    Command ::safe::AliasGlob constructs a command cmd to be passed to the safe interpreter's hidden glob command.
    
    Command ::safe::AliasGlob conspires to require that, in order to supply a valid search pattern to cmd, the caller must supply arguments -directory virtualdir, and the value virtualdir must begin with a valid tokenized directory.
    
    It does this by
      #   testing that each directory [file join $virtualdir $thedir] (where thedir is the directory part of the search pattern) belongs to the tokenized access path
      #   NOT translating from tokens the pattern arguments supplied to cmd.  Only the virtualdir is translated.
    
    E.g. if -directory virtualdir is not supplied, and the search pattern is {$p(:4:)/*}, the directory is {$p(:4:)} and passes the "access path" test.  But the pattern passed to glob as cmd is {$p(:4:)/*} and has no matches against real directories.  The glob has no matches.
    
    For the sake of clarity it would be useful to process the case without arguments "-directory virtualdir" near the start of the command, so the case analysis in the rest of the command is simplified.
    
    Fixed in branch safe-bugfixes-8-6 commit [dc38ed6dd6].
    
  5. foundin changed to: "core-8-6-branch"
  6. is_private changed to: "0"
  7. login: "kjnash"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "a774b1f5653dc3360e29ea7d635a64e94c9f1dab"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "kjnash"
  14. subsystem changed to: "33. Safe Base"
  15. title changed to: "Simplify case analysis in safe::AliasGlob"
  16. type changed to: "RFE"