Compare commits

...

3 Commits

Author SHA1 Message Date
Ventilaar
4fa0ee2c68 Hotfix channel sorting 2024-04-09 12:11:14 +02:00
Ventilaar
7e06c8673b Update PyJWT requirement 2024-04-06 23:27:18 +02:00
Ventilaar
96565e9e2b Add small time difference leeway 2024-04-06 23:23:32 +02:00
4 changed files with 11 additions and 10 deletions

View File

@@ -48,7 +48,7 @@ Extra functionality for further development of features.
- [x] Video reporting functionality - [x] Video reporting functionality
- [x] Ability (for external applications) to queue up video ids for download - [x] Ability (for external applications) to queue up video ids for download
- [x] Add websub requesting and receiving ability. (not fully usable yet without celery tasks) - [x] Add websub requesting and receiving ability. (not fully usable yet without celery tasks)
- [] OIDC or Webauthn logins instead of static argon2 passwords - [x] OIDC or Webauthn logins instead of static argon2 passwords
### Stage 3 ### Stage 3
Mainly focused on retiring the cronjob based scripts and moving it to celery based tasks Mainly focused on retiring the cronjob based scripts and moving it to celery based tasks

View File

@@ -34,7 +34,7 @@ def channel(channelId):
for videoId in videoIds: for videoId in videoIds:
videos.append(get_nosql().get_video_info(videoId, limited=True)) videos.append(get_nosql().get_video_info(videoId, limited=True))
videos = sorted(videos, key=lambda x: x.get('upload_date'), reverse=True) videos = sorted(videos, key=lambda x: x.get('upload_date', '19700101'), reverse=True)
return render_template('channel/channel.html', channel=channelInfo, videos=videos) return render_template('channel/channel.html', channel=channelInfo, videos=videos)

View File

@@ -114,8 +114,10 @@ class OIDC():
algorithms=jwt.algorithms.get_default_algorithms(), algorithms=jwt.algorithms.get_default_algorithms(),
issuer=self.provider, issuer=self.provider,
require=['aud', 'client_id', 'exp', 'iat', 'iss', 'rat', 'sub'], require=['aud', 'client_id', 'exp', 'iat', 'iss', 'rat', 'sub'],
audience=self.client_id) audience=self.client_id,
except: leeway=5)
except Exception as e:
print(e, flush=True)
return False return False
# double check if given token is really requested by us # double check if given token is really requested by us

View File

@@ -5,8 +5,7 @@ flask-caching
flask-limiter flask-limiter
pymongo pymongo
yt-dlp yt-dlp
argon2-cffi
gunicorn gunicorn
celery celery
sqlalchemy sqlalchemy
pyjwt pyjwt[crypto]