mirror of
https://github.com/danog/TelegramApiServer.git
synced 2024-11-26 20:04:45 +01:00
Allow to start without password
This commit is contained in:
parent
6e37877ca2
commit
c324de5d21
@ -32,7 +32,7 @@ class SystemApiExtensions
|
||||
foreach ($sessions as $sessionKey => $session) {
|
||||
$instance = $this->client->instances[$sessionKey];
|
||||
if ($instance->getAuthorization() === API::LOGGED_IN) {
|
||||
$results[$sessionKey] = $instance->fullGetSelf();
|
||||
$results[$sessionKey] = $instance->getSelf();
|
||||
}
|
||||
}
|
||||
return $results;
|
||||
|
@ -24,7 +24,7 @@ class Authorization implements Middleware
|
||||
$this->ipWhitelist = (array)Config::getInstance()->get('api.ip_whitelist', []);
|
||||
$this->passwords = Config::getInstance()->get('api.passwords', []);
|
||||
if (!$this->ipWhitelist && !$this->passwords) {
|
||||
throw new \InvalidArgumentException('API is unprotected! Please specify IP_WHITELIST or PASSWORD in .env.docker');
|
||||
error('API is unprotected! Please specify IP_WHITELIST or PASSWORD in .env.docker');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user