SecRequestSharedWebCredential returns an invalid credential when the user has told Safari not to save passwords for a given domain
| Originator: | aaron | ||
| Number: | rdar://32472903 | Date Originated: | 5/30/2017 |
| Status: | Duplicate of 24275860 | Open | Resolved: | |
| Product: | Security Framework | Product Version: | 10.3.2 |
| Classification: | Bug | Reproducible: | Always |
In my case, I have selected to never save passwords for imgur.com when prompted in Safari. Now when calling SecRequestSharedWebCredential, I receive an entry with "Passwords not saved" as the account and " " (one space) as the password. May be a duplicate of radar: 25439039 (seen on openradar), but it claimed not reproducible and didn't understand the full situation as a result of being unable to reproduce. Steps to Reproduce: Abstract example: 1. Set a site to never remember passwords in Safari 2. Call SecRequestSharedWebCredential(NULL, NULL, ...) 3. Check that credential count > 0 as per documentation 4. Extract the first credential and get the value for kSecAttrAccount and kSecSharedPassword 5. Observe that the value associated with kSecAttrAccount is "Passwords not saved" and the value associated with kSecSharedPassword is " " (single space) Concrete example: 1. Visit Imgur.com, create an account/sign in and instruct Safari to never remember passwords for this site 2. Download Imgur app (if first time, you are prompted to sign up immediately which will trigger the shared credential request and show an account of "Passwords not saved" as a selectable option. 3. Select the option and note that the password provided is " " Expected Results: No shared web credentials should be available (the CFArrayRef in the closure for SecRequestSharedWebCredential should have a CFArrayGetCount of 0) Observed Results: The CFArrayRef in the closure for SecRequestSharedWebCredential is > 0 and the first is "Passwords not saved" / " "
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!