mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
windows: try to escape trailing double quote in user input
we try to remove the trailing double quote for user input such as this one sftpgo.exe serve -c "C:\ProgramData\SFTPGO\" the value for the -c flag is parsed as: C:\ProgramData\SFTPGO" this is what the user specified, but the user want this value: C:\ProgramData\SFTPGO so we try to remove the trailing double quote. Please note that we cannot do anything for something like this: -c "C:\ProgramData\SFTPGO\" -l "sftpgo.log" in this case the -l flag will be ignored and the value for the c flag is: C:\ProgramData\SFTPGO" -l sftpgo.log and so probably it is invalid. This is definitely a bad user input
This commit is contained in:
@@ -138,7 +138,7 @@ func init() {
|
||||
portableCmd.Flags().BoolVarP(&portableAdvertiseService, "advertise-service", "S", true,
|
||||
"Advertise SFTP service using multicast DNS")
|
||||
portableCmd.Flags().BoolVarP(&portableAdvertiseCredentials, "advertise-credentials", "C", false,
|
||||
"If the SFTP service is advertised via multicast DNS this flag allows to put username/password inside the advertised TXT record")
|
||||
"If the SFTP service is advertised via multicast DNS, this flag allows to put username/password inside the advertised TXT record")
|
||||
portableCmd.Flags().IntVarP(&portableFsProvider, "fs-provider", "f", 0, "0 means local filesystem, 1 Amazon S3 compatible, "+
|
||||
"2 Google Cloud Storage")
|
||||
portableCmd.Flags().StringVar(&portableS3Bucket, "s3-bucket", "", "")
|
||||
|
||||
Reference in New Issue
Block a user