diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2016-11-18 12:08:30 +0100 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2016-11-18 12:30:32 +0100 |
commit | dd826a5f20837f33263c658e41a4def0fc932069 (patch) | |
tree | 0b5a37b5a5f9c12bfef330e5286a165eae90fe2f /lib/mattermost | |
parent | f749fb7fe0574d07eeb38561b9af62754e518281 (diff) | |
download | gitlab-ce-dd826a5f20837f33263c658e41a4def0fc932069.tar.gz |
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.rb | 4 |
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) |