File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
99### Deprecated
1010### Removed
1111### Fixed
12+ - Secret should not be required when using CLI for getUpdates.
1213### Security
1314
1415## [ 1.2.0] - 2017-07-10
Original file line number Diff line number Diff line change @@ -152,8 +152,11 @@ private function validateAndSetBotParamsVital(array $params)
152152 private function validateAndSetBotParamsSpecial (array $ params )
153153 {
154154 // Special case, where secret MUST be defined if we have a webhook.
155- if (($ params ['webhook ' ] ?? null ) && !($ params ['secret ' ] ?? null )) {
156- throw new InvalidParamsException ('Some vital info is missing: secret ' );
155+ if (($ params ['webhook ' ]['url ' ] ?? null ) && !($ params ['secret ' ] ?? null )) {
156+ // This does not apply when using CLI, but make sure it gets tested for!
157+ if ('cli ' !== PHP_SAPI || BotManager::inTest ()) {
158+ throw new InvalidParamsException ('Some vital info is missing: secret ' );
159+ }
157160 }
158161 }
159162
You can’t perform that action at this time.
0 commit comments