You are not logged in.

#1 2008-04-23 18:09:09

synthead
Member
Registered: 2006-05-09
Posts: 1,337

CUPS WebUI redirecting me to invalid URLs

When at the CUPS WebUI, if I click on the Printers tab and click on Delete Printer on any of my printers, it tries to qo to a URL like this:

http://::1/admin/?op=delete-printer&printer_name=HP_Color_LaserJet_2840_192.168.1.208

And firefox reads:

This address is restricted

This address uses a network port which is normally used for purposes other than Web browsing. Firefox has canceled the request for your protection.

I have to go to the URL bar and change it from http://::1/ to http://127.0.0.1:631/ every time I want to do something administrative.  Is there a fix for this?

Offline

#2 2008-04-24 19:26:51

calef13
Member
Registered: 2007-06-10
Posts: 142

Re: CUPS WebUI redirecting me to invalid URLs

This "feature" of firefox really annoys me too, it blocks various other services if you aren't careful, even though I know they are fine, a warning would be better although nothing would be preferable. I haven't found a way to turn this off in firefox, but I haven't looked a lot to be fair.

Offline

#3 2009-04-23 11:42:59

Joe90
Member
From: Winchester UK
Registered: 2009-04-12
Posts: 4
Website

Re: CUPS WebUI redirecting me to invalid URLs

Try the following three commands (as root if you don't use sudo)

~$ sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.backup
~$ sudo cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf
~$ sudo /etc/rc.d/cups restart

If you have any specific settings in cupsd.conf you have them backed up, and i suggest you copy them over one at a time and test smile

Offline

#4 2009-04-23 23:06:10

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: CUPS WebUI redirecting me to invalid URLs

I have a similar problem -- if I'm accessing CUPS remotely (ie, not from localhost), all the links within the CUPS page still point to 127.0.0.1 instead of the address I used to access the remote computer... I wonder if these are related issues?

Offline

#5 2009-04-24 04:25:28

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: CUPS WebUI redirecting me to invalid URLs

http://cups.org/articles.php?L582

The web interface sometimes incorrectly redirected users to 127.0.0.1 (STR #3022)

please check if you use all recent options in your config file and then check if there's really a regression.

Offline

#6 2009-04-28 23:38:12

benob
Member
Registered: 2008-11-11
Posts: 187

Re: CUPS WebUI redirecting me to invalid URLs

/etc/cups/cups.conf

# Only listen for connections from the local machine.
Listen localhost:631

change it to:
Listen 127.0.0.1:631

and restart cups. basically, firefox does not allow a page to open a url on localhost (see http://www.gnucitizen.org/blog/pwning-ubuntu-via-cups/) unless it originated from localhost. apparently, 127.0.0.1 and ::1 are not recognized as the same thing.

Offline

#7 2009-05-08 21:09:27

benob
Member
Registered: 2008-11-11
Posts: 187

Re: CUPS WebUI redirecting me to invalid URLs

benob wrote:

/etc/cups/cups.conf

# Only listen for connections from the local machine.
Listen localhost:631

change it to:
Listen 127.0.0.1:631

and restart cups. basically, firefox does not allow a page to open a url on localhost (see http://www.gnucitizen.org/blog/pwning-ubuntu-via-cups/) unless it originated from localhost. apparently, 127.0.0.1 and ::1 are not recognized as the same thing.

Actually, this change prevents firefox from seeing the printers from cups (because firefox is looking at ::1 and not 127.0.0.1), so I ended up reverting it and changing /etc/hosts instead:

127.0.0.1    localhost.localdomain   localhost
::1    localhost.localdomain   localhost

this seems to work better.

Offline

Board footer

Powered by FluxBB