mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-14 11:26:24 +00:00
Validate length of token_hash. Increase expiry times of routing status.
This commit is contained in:
parent
d1f671cf66
commit
5b214c3b9c
@ -395,12 +395,12 @@ class Order(models.Model):
|
||||
10: 60 * 60 * int(config("FIAT_EXCHANGE_DURATION")),# 'Fiat sent - In chatroom'
|
||||
11: 1 * 24 * 60 * 60, # 'In dispute'
|
||||
12: 0, # 'Collaboratively cancelled'
|
||||
13: 24 * 60 * 60, # 'Sending satoshis to buyer'
|
||||
14: 24 * 60 * 60, # 'Sucessful trade'
|
||||
15: 24 * 60 * 60, # 'Failed lightning network routing'
|
||||
13: 10 * 24 * 60 * 60, # 'Sending satoshis to buyer'
|
||||
14: 10 * 24 * 60 * 60, # 'Sucessful trade'
|
||||
15: 10 * 24 * 60 * 60, # 'Failed lightning network routing'
|
||||
16: 10 * 24 * 60 * 60, # 'Wait for dispute resolution'
|
||||
17: 24 * 60 * 60, # 'Maker lost dispute'
|
||||
18: 24 * 60 * 60, # 'Taker lost dispute'
|
||||
17: 10 * 24 * 60 * 60, # 'Maker lost dispute'
|
||||
18: 10 * 24 * 60 * 60, # 'Taker lost dispute'
|
||||
}
|
||||
|
||||
return t_to_expire[status]
|
||||
|
@ -82,17 +82,19 @@ class UpdateOrderSerializer(serializers.Serializer):
|
||||
|
||||
class UserGenSerializer(serializers.Serializer):
|
||||
# Mandatory fields
|
||||
token_sha256 = serializers.CharField(max_length=64,
|
||||
token_sha256 = serializers.CharField(
|
||||
min_length=64,
|
||||
max_length=64,
|
||||
allow_null=False,
|
||||
allow_blank=False,
|
||||
required=True,
|
||||
help_text="SHA256 of user secret")
|
||||
public_key = serializers.CharField(max_length=999,
|
||||
public_key = serializers.CharField(max_length=2000,
|
||||
allow_null=False,
|
||||
allow_blank=False,
|
||||
required=True,
|
||||
help_text="Armored ASCII PGP public key block")
|
||||
encrypted_private_key = serializers.CharField(max_length=999,
|
||||
encrypted_private_key = serializers.CharField(max_length=2000,
|
||||
allow_null=False,
|
||||
allow_blank=False,
|
||||
required=True,
|
||||
|
Loading…
Reference in New Issue
Block a user