mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-16 07:50:16 +02:00
Corrected default invite parameters to increase security: 5 minute lifetime, 1 use.
This commit is contained in:
parent
7001071820
commit
728a18b763
@ -124,12 +124,12 @@ class DiscordAPIManager:
|
|||||||
return r.json()
|
return r.json()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create_invite(server_id, max_age=0, max_users=1, temporary=True, xkcdpass=False):
|
def create_invite(server_id, max_age=600, max_uses=1, temporary=True, xkcdpass=False):
|
||||||
custom_headers = {'authorization': DiscordAPIManager.get_auth_token()}
|
custom_headers = {'authorization': DiscordAPIManager.get_auth_token()}
|
||||||
path = DISCORD_URL + "/channels/" + str(server_id) + "/invites"
|
path = DISCORD_URL + "/channels/" + str(server_id) + "/invites"
|
||||||
data = {
|
data = {
|
||||||
'max_age': max_age,
|
'max_age': max_age,
|
||||||
'max_users': max_users,
|
'max_uses': max_uses,
|
||||||
'temporary': temporary,
|
'temporary': temporary,
|
||||||
'xkcdpass': xkcdpass,
|
'xkcdpass': xkcdpass,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user