From 35a7f0de2290a91fcf5fbbcbadd9198fec3c4071 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 13 Oct 2015 16:04:10 -0400 Subject: [PATCH] Add '.' to GenericNameRegex; it cannot appear as the first or last character. This allows its usage in a number of extra path-based variables. Ping #244 --- CHANGELOG.md | 1 + logical/framework/path.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67847f84c..32c1aa782 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ IMPROVEMENTS: * core: The physical storage read cache can now be disabled via "disable_cache" [GH-674] * core: Tokens can now renew themselves [GH-455] * core: Base64-encoded PGP keys can be used with the CLI for `init` and `rekey` operations [GH-653] + * logical: Allow `.` in path-based variables in many more locations [GH-244] * logical: Responses now contain a "warnings" key containing a list of warnings returned from the server. These are conditions that did not require failing an operation, but of which the client should be aware. [GH-676] BUG FIXES: diff --git a/logical/framework/path.go b/logical/framework/path.go index d85a5c054..b1f166275 100644 --- a/logical/framework/path.go +++ b/logical/framework/path.go @@ -11,7 +11,7 @@ import ( // Helper which returns a generic regex string for creating endpoint patterns // that are identified by the given name in the backends func GenericNameRegex(name string) string { - return fmt.Sprintf("(?P<%s>\\w[\\w-]+\\w)", name) + return fmt.Sprintf("(?P<%s>\\w[\\w-.]+\\w)", name) } // PathAppend is a helper for appending lists of paths into a single