Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-1195

/static_file_content should serve files from any directory, not just modules/

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: SERVER 2.3.0
    • Component/s: None
    • Labels:
    • Template:
    • Sub-team:
    • Story Points:
      1
    • Sprint:
      Server Jade 2016-03-09, Server Jade 2016-03-23

      Description

      Code which appears to need changing is:

      (schema/defn ^:always-validate valid-static-file-path?
        "Helper function to decide if a static_file_content path is valid.
        The access here is designed to mimic Puppet's file_content endpoint."
        [path :- schema/Str]
        (when-let [canonicalized-path (decode-and-canonicalize-path path)]
           ;; Here, keywords represent a single element in the path. Anything between two '/' counts.
           ;; The second vector takes anything else that might be on the end of the path.
           ;; Below, this corresponds to 'modules/*/files/**' in a filesystem glob.
           (bidi.bidi/match-route [["modules/" :module-name "/files/" [#".*" :rest]] :_]
                                  canonicalized-path)))
      

      Note the modules/ in that.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              john.duarte John Duarte
              Reporter:
              kevin.corcoran Kevin Corcoran
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support