nsGNOMERegistry::HandlerExists returns true even when the handler is disabled

RESOLVED FIXED

Status

RESOLVED FIXED
15 years ago
2 years ago

People

(Reporter: chpe, Assigned: chpe)

Tracking

Trunk
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031111 Epiphany/1.1.0

nsGNOMERegistry::HandlerExists checks if
/desktop/gnome/url-handlers/<scheme>/command gconf key exists, and returns
PR_TRUE if it does. But if the handler is disabled
(/desktop/gnome/url-handlers/<scheme>/enabled either false or not set),
::LoadURL will silently fail/do nothing since it uses gnome_url_show() which
does that check. I think instead ::HandlerExists should check both if the
handler command exists and if the handler is enabled, and only return true if it is.

Reproducible: Always

Steps to Reproduce:
1) Configure /desktop/gnome/url-handlers/test/command to "echo "%s""
2) Configure /desktop/gnome/url-handlers/test/enabled to false
2) type test:Test

Actual Results:  
Saw "Test" on console.

Expected Results:  
No output on console since I disabled the handler. Instead a "test: is not a
registered protocol" dialogue.
Created attachment 136172 [details] [diff] [review]
check if the handler is enabled
Attachment #136172 - Flags: review?(bryner) → review+
Comment on attachment 136172 [details] [diff] [review]
check if the handler is enabled

sr=bzbarsky.  Please poke me when the tree reopens for 1.7a to check this in...

If you think this should really go into 1.6, set the approval request flag on
this patch and make a comment explaining why this is something drivers should
take for 1.6...
Attachment #136172 - Flags: superreview+
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: file-handling → chpe
Patch checked in to 1.7a.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.