I ended up having a look through the source code and found the commit where this error is thrown:
GitHub Commit
remote->local directory copies satisfy the wildcard specified by the
user.This checking provides some protection against a malicious server
sending unexpected filenames, but it comes at a risk of rejecting
wanted files due to differences between client and server wildcard
expansion rules.For this reason, this also adds a new -T flag to disable the check.
They have added a new flag -T
that will ignore this new check they’ve added so it is backwards compatible. However, I suppose we should look and find out why the filenames we’re using are flagged as restricted.