Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2016-11-18 14:08:30 +0300
committerZ.J. van de Weg <git@zjvandeweg.nl>2016-11-18 14:30:32 +0300
commitdd826a5f20837f33263c658e41a4def0fc932069 (patch)
tree0b5a37b5a5f9c12bfef330e5286a165eae90fe2f /lib/mattermost
parentf749fb7fe0574d07eeb38561b9af62754e518281 (diff)
Return a consistent not found message
This prevents leakage of project names on an endpoint which is unauthenticated and thus open to the world.
Diffstat (limited to 'lib/mattermost')
-rw-r--r--lib/mattermost/presenter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mattermost/presenter.rb b/lib/mattermost/presenter.rb
index b4e7358770f..f76d0376a98 100644
--- a/lib/mattermost/presenter.rb
+++ b/lib/mattermost/presenter.rb
@@ -14,8 +14,8 @@ module Mattermost
end
def help(commands, trigger)
- if commands.empty?
- ephemeral_response("No commands configured") unless messages.count > 1
+ if commands.zero?
+ ephemeral_response("No commands configured")
else
message = header_with_list("Available commands", commands)