-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(API): Allow to block older clients #9632
feat(API): Allow to block older clients #9632
Conversation
ada65d3
to
225f65a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks great for me.
What do you think about adding the min required version to the response?
/** | ||
* Talk Desktop user agent but with a regex match for the version | ||
* @see IRequest::USER_AGENT_TALK_DESKTOP | ||
*/ | ||
public const USER_AGENT_TALK_DESKTOP = '/^Mozilla\/5\.0 \((?!Android|iOS)[A-Za-z ]+\) Nextcloud-Talk v([^ ]*).*$/'; | ||
public const TALK_DESKTOP_MIN_VERSION = '0.6.0'; | ||
|
||
/** | ||
* Talk Android user agent but with a regex match for the version | ||
* @see IRequest::USER_AGENT_TALK_ANDROID | ||
*/ | ||
public const USER_AGENT_TALK_ANDROID = '/^Mozilla\/5\.0 \(Android\) Nextcloud\-Talk v([^ ]*).*$/'; | ||
public const TALK_ANDROID_MIN_VERSION = '15.0.0'; | ||
|
||
/** | ||
* Talk iOS user agent but with a regex match for the version | ||
* @see IRequest::USER_AGENT_TALK_IOS | ||
*/ | ||
public const USER_AGENT_TALK_IOS = '/^Mozilla\/5\.0 \(iOS\) Nextcloud\-Talk v([^ ]*).*$/'; | ||
public const TALK_IOS_MIN_VERSION = '15.0.0'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also update IRequest REs for version support in the server?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see what others think: nextcloud/server#38561
lib/Middleware/Exceptions/UnsupportedClientVersionException.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to me after an update too, thanks for adding a version to the message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to me after an update too, thanks for adding a version to the message.
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
6183be4
to
d0ca6ec
Compare
☑️ Resolves
426 Upgrade Required
status code🚧 Tasks
🏁 Checklist
docs/
has been updated or is not required