Closed Bug 166296 Opened 23 years ago Closed 9 years ago

"browse" button in "open" dialog button returns garbage after picking a file

Categories

(Core Graveyard :: Security: UI, defect, P3)

1.0 Branch
PowerPC
macOS
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: Bill.Burns, Unassigned)

Details

(Whiteboard: [kerh-coz])

reproducable: always. latest tried version: Mozilla 1.1 RTM OS: Mac OS X 10.1.5, 10.2 Steps to reproduce: Open the preferences window Choose "Privacy&Security->Certificates->Manage Security Devices..." Choose "Load" When asked to choose a module filename, click "browse..." Proceed to pick a file (it doesn't matter what the file is called or where it's stored in order to see this bug) Once the desired file is select, click OK You'll be back at the "load module" dialog but notice how the resulting "filename" is now a string of garbage. Desired result: provide a proper fully-qualified path and file name.
Confirmed using FizzillaCFM/2002083017 on 10.1.5. Reassigning to Security: General.
Assignee: law → mstoltz
Status: UNCONFIRMED → NEW
Component: File Handling → Security: General
Ever confirmed: true
QA Contact: sairuh → bsharma
This is a PSM bug.
Component: Security: General → Client Library
Product: Browser → PSM
Target Milestone: --- → 2.4
Version: other → 2.3
kai
Assignee: mstoltz → kaie
Priority: -- → P2
QA Contact: bsharma → junruh
Keywords: nsbeta1
Are we sure the resulting string is really garbage? Or is it just some Mac specific file path? The code obtains nsIFilePicker.file which is of type nsILocalFile and accesses attribute persistentDescriptor A comment for persistentDescriptor says "DO NOT TRY TO INTERPRET IT AS HUMAN READABLE TEXT!" I'm just starting to learn Mac, so I can only guess: Is it possible that all is fine, and the only problem here is confusion about a non human readable represenatation of the selected file name? If my suspicion is correct, is there a better way to provide a human readable represenatation of the selected path?
Clicking on "OK" to accept the non-human-readable string results in a failure to add the new security module.
Confirming. Browsing to the file on the Mac doesn't work. You have to type in the actual location, such as "Macintosh HD:pkcs11.shlb". Then you can add the device. Otherwise adding the device fails.
Priority: P2 → P3
Version: 2.3 → 2.4
We need help from a nsILocalFile / nsIFile guru. What should we use to access, display and store the native path of a file, that works on all platforms?
kai, on the mac, persistent descriptors are base-64 encoded alias records. clearly, this shouldn't be displayed ot the user. If you must display something to the use, just use the leaf name. If the leaf name isn't enough, use the path. Do access the nsFile's content, either use the Open method, or use necko. All of the above will work XP.
not sure if this helps, but I noticed that the "browse..." button when adding helper applications works just fine. maybe you can re-use that code or examine it to see how someone else got it to work on the mac in OS X.
Product: PSM → Core
Whiteboard: [kerh-coz]
changing obsolete psm* target to --- (unspecified)
Target Milestone: psm2.4 → ---
QA Contact: junruh → ui
Version: psm2.4 → 1.0 Branch
reassign bug owner. mass-update-kaie-20120918
Assignee: kaie → nobody
Somewhere along the line the use of persistentDescriptor was removed, so I think this is WFM.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.