[Bug]: Unlisted breaking change in v2.6.0 with virtual folders returned by extrenal hooks #1632
Closed
2 tasks done
Labels
bug
Something isn't working
Bug description
In v2.6.0:
user.virtual_folders
).If the external auth hook does not provide a virtual folder id SFTPGo will:
NOT NULL constraint failed: users_folders_mapping.folder_id
if no virtual folder with the same name existerror creating root directory "/virtual_path" for user "test": mkdir : no such file or directory
when listing the virtual folder via SSH, if a virtual folder with the same name existIs this new behavior expected ? If the answer is yes, is it possible to add this change in the
Backward incompatible changes
list and create an error clearly state that user external auth hook need to return virtual folders with ids. I personally would prefer to keep the old behavior. This new behavior will create a dependency both way between my external auth and SFTPGo.Steps to reproduce
I created a repo with the smallest config to reproduce the issue (https://github.com/Mathieu-COSYNS/sftpgo-external-auth-virtual-folder-issue)
TLDR;
id
and/or
id
Expected behavior
When returning a virtual folder from a external auth hook, SFTPGo creates the virtual folder if no virtual folder with the same name exist.
SFTPGo version
v2.6.0
Data provider
any
Installation method
Community Docker image
Configuration
Checkout (https://github.com/Mathieu-COSYNS/sftpgo-external-auth-virtual-folder-issue)
Relevant log output
No response
What are you using SFTPGo for?
Private user, home usecase (home backup/VPS)
Additional info
Relevant code changes from SFTPGo v2.5.6 changed in v2.6.0
sftpgo/openapi/openapi.yaml
Line 5872 in a6a92f0
sftpgo/internal/dataprovider/sqlcommon.go
Lines 2339 to 2350 in a6a92f0
sftpgo/internal/dataprovider/sqlcommon.go
Line 2574 in a6a92f0
The text was updated successfully, but these errors were encountered: