diff options
author | Chris <ccbrown112@gmail.com> | 2017-09-11 10:02:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-11 10:02:02 -0500 |
commit | 402491b7e52c4d836c1274976cdb387852cfd17b (patch) | |
tree | e8adcbdf0af5370f8af11e3fc1021a328c971a5d /api4 | |
parent | a69bed712d53e9a7984915fffffc8a2fd1647a7a (diff) | |
download | chat-402491b7e52c4d836c1274976cdb387852cfd17b.tar.gz chat-402491b7e52c4d836c1274976cdb387852cfd17b.tar.bz2 chat-402491b7e52c4d836c1274976cdb387852cfd17b.zip |
PLT-7407: Back-end plugins (#7409)
* tie back-end plugins together
* fix comment typo
* add tests and a bit of polish
* tests and polish
* add test, don't let backend executable paths escape the plugin directory
Diffstat (limited to 'api4')
-rw-r--r-- | api4/api.go | 2 | ||||
-rw-r--r-- | api4/plugin_test.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/api4/api.go b/api4/api.go index 5204c0596..50c56ca0b 100644 --- a/api4/api.go +++ b/api4/api.go @@ -150,7 +150,7 @@ func InitApi(full bool) { BaseRoutes.PublicFile = BaseRoutes.Root.PathPrefix("/files/{file_id:[A-Za-z0-9]+}/public").Subrouter() BaseRoutes.Plugins = BaseRoutes.ApiRoot.PathPrefix("/plugins").Subrouter() - BaseRoutes.Plugin = BaseRoutes.Plugins.PathPrefix("/{plugin_id:[A-Za-z0-9\\_\\-]+}").Subrouter() + BaseRoutes.Plugin = BaseRoutes.Plugins.PathPrefix("/{plugin_id:[A-Za-z0-9\\_\\-\\.]+}").Subrouter() BaseRoutes.Commands = BaseRoutes.ApiRoot.PathPrefix("/commands").Subrouter() BaseRoutes.Command = BaseRoutes.Commands.PathPrefix("/{command_id:[A-Za-z0-9]+}").Subrouter() diff --git a/api4/plugin_test.go b/api4/plugin_test.go index 3d8b065b9..0e8c0638c 100644 --- a/api4/plugin_test.go +++ b/api4/plugin_test.go @@ -110,5 +110,5 @@ func TestPlugin(t *testing.T) { _, resp = th.SystemAdminClient.RemovePlugin("bad.id") CheckNotFoundStatus(t, resp) - th.App.Srv.PluginEnv = nil + th.App.PluginEnv = nil } |