Odd question. I know Property fields have different behaviors relating to retaining their values depending on if compiled or not. I am building an Cocoa GUI to control my AppleScript. I have posted the project and some builds on GitHub (hidden now). I don’t think this is the case, but is there any possibility that my Administrator password could have been retained in either the .xcodeproj or in the compiled .app of my program?
I have a two relevant properties in my AppleScript:
property shellPassword : missing value
property shellPasswordField : missing value
shellPasswordField is the Referencing Outlet Delegate for a Secure Password Field Cell. It is not bound to the value of either property though, which I think would be the only reason I would need to worry.
Then the password is checked by this function:
on checkPasswd:sender
set shellPassword to shellPasswordField’s stringValue() as text
try
do shell script “sudo -K”
do shell script “/bin/echo” password shellPassword with administrator privileges
display notification “Auth Success”
delay 1
return 1
on error errMsg number errorNumber
display dialog "Debugging alert error occurred: " & errMsg as text & " Num: " & errorNumber as text
–display alert “Sorry, you’ve entered an invalid password. Please try again.”
return 0
end try
end checkPasswd:
Obviously the values are also sent as senders to other functions in the program, but I don’t think they’re relevant. I can post them if needed.