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
This commit is contained in:
Jeff Mitchell 2015-10-13 16:04:10 -04:00
parent 78b5fcdf51
commit 35a7f0de22
2 changed files with 2 additions and 1 deletions

View File

@ -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:

View File

@ -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