From e32bf348302a2e208921c8d92a6f4b14b9458b64 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 10 Jul 2018 22:07:24 +0900 Subject: [PATCH] Update call.ts --- src/server/api/call.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server/api/call.ts b/src/server/api/call.ts index b1e166876..9257ed590 100644 --- a/src/server/api/call.ts +++ b/src/server/api/call.ts @@ -8,6 +8,10 @@ export default (endpoint: string | Endpoint, user: IUser, app: IApp, data: any, const ep = typeof endpoint == 'string' ? endpoints.find(e => e.name == endpoint) : endpoint; + if (ep.name.includes('.') { + return rej('INVALID_ENDPOINT'); + } + if (ep.secure && !isSecure) { return rej('ACCESS_DENIED'); }