@@ -164,7 +164,7 @@ func (mounter *Mounter) MountSensitive(source string, target string, fstype stri
164
164
// return (output, error)
165
165
func newSMBMapping (username , password , remotepath string ) (string , error ) {
166
166
if username == "" || password == "" || remotepath == "" {
167
- return "" , fmt .Errorf ("invalid parameter(username: %s, password: %s, remoteapth : %s)" , username , sensitiveOptionsRemoved , remotepath )
167
+ return "" , fmt .Errorf ("invalid parameter(username: %s, password: %s, remotepath : %s)" , username , sensitiveOptionsRemoved , remotepath )
168
168
}
169
169
170
170
// use PowerShell Environment Variables to store user input string to prevent command line injection
@@ -193,8 +193,8 @@ func isSMBMappingExist(remotepath string) bool {
193
193
// check whether remotepath is valid
194
194
// return (true, nil) if remotepath is valid
195
195
func isValidPath (remotepath string ) (bool , error ) {
196
- cmd := exec .Command ("powershell" , "/c" , `Test-Path $Env:remoteapth ` )
197
- cmd .Env = append (os .Environ (), fmt .Sprintf ("remoteapth =%s" , remotepath ))
196
+ cmd := exec .Command ("powershell" , "/c" , `Test-Path $Env:remotepath ` )
197
+ cmd .Env = append (os .Environ (), fmt .Sprintf ("remotepath =%s" , remotepath ))
198
198
output , err := cmd .CombinedOutput ()
199
199
if err != nil {
200
200
return false , fmt .Errorf ("returned output: %s, error: %v" , string (output ), err )
0 commit comments