Adjust user agent for recording server to not match with desktop client #9940
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow up to #9632
The recording server
usesusedMozilla/5.0 (Recording) Nextcloud-Talk vXXX
as its user agent, which wrongly matched with the regular expression for the desktop client.Moreover, as the recording server version is lower than the minimum allowed desktop client version the recording server requests were blocked by the Nextcloud server.
The regular expression provided by the Nextcloud server would need to be updated as well; it is used in the inital check, although the final check that throws the exception if needed uses the local regular expression, but as far as I understand in the future the regular expression from the server will be used also there.Alternatively, rather than modifying the regular expressions the user agent from the recording server could be changed to something that does not match the desktop client (for example,Mozilla/5.0 Nextcloud-Talk-Recording vXXX
).Due to all that the user agent of the recording server is now set to
Nextcloud-Talk-Recording/XXX
, similar to what is used by other libraries and net tools, like curl.