You are not logged in.

#1 2024-06-01 20:06:34

jorgenwiki
Member
Registered: 2024-04-01
Posts: 25

cups web interface partialy broken [Solved]

The question mark in de URL of the web interface leads sometimes to "Not Found" page:

1. If I go to: localhost:631/admin and click on the button "Manage Printers" the URL becomes "localhost:631/printers/?" and reads "Not Found" if I remove the "/?" on the end the page with Printers is shown
2. Same goes for "Manage Classes" button.
3. The button "Manage Jobs" and all other buttons work, so it's not consequent the question mark.

This is on two different systems with Arch Linux.
I tested it also on a third Ubuntu system (Cups 2.3.1 in stead of 2.4.8) and the the addresses are the same and all the pages work fine.

Am I making an incomplete install or error, or is this a bug?
Can anyone confirm this if it is a bug?
Or else what could/should I change?

Last edited by jorgenwiki (2024-06-04 08:57:07)

Offline

#2 2024-06-02 07:22:44

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,862

Re: cups web interface partialy broken [Solved]

the the addresses are the same

You get a semi-bogus "/?" tail in your url *everywhere* but it works in other contexts?
Do you use the same browser everywhere?

curl http://localhost:631/ | grep href

Offline

#3 2024-06-02 08:30:21

jorgenwiki
Member
Registered: 2024-04-01
Posts: 25

Re: cups web interface partialy broken [Solved]

No, i don't get elsewhere the bogus tail  "/?".

curl http://localhost:631/ | grep href:
    <link rel="stylesheet" href="/cups.css" type="text/css">
    <link rel="shortcut icon" href="/apple-touch-icon.png" type="image/png">
	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
	<li><a href="/">Home</a></li>
	<li><a href="/admin">Administration</a></li>
	<li><a href="/classes/">Classes</a></li>
	<li><a class="active" href="/help/">Help</a></li>
	<li><a href="/jobs/">Jobs</a></li>
	<li><a href="/printers/">Printers</a></li>
<P>If you are new to CUPS, read the "<a href="/help/overview.html">Overview of CUPS</a>" page.</P>

I can't use curl with http://localhost:631/admin, because a password is required. If on the other hand I check the source of Firefox (buttons in Administration). I get:

<h1>Administration</h1>
<div class="row">
  <div class="halves">
    <H2 CLASS="title">Printers</H2>

    <P>
    <FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="8a1fd9d54140676f2fac1c488af64ca1"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="add-printer"><INPUT TYPE="SUBMIT" VALUE="Add Printer"></FORM>
    <FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="8a1fd9d54140676f2fac1c488af64ca1"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="find-new-printers"><INPUT TYPE="SUBMIT" VALUE="Find New Printers"></FORM>
    <FORM ACTION="/printers/" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Manage Printers"></FORM>
    </P>

    <H2 CLASS="title">Classes</H2>

    <P>
    <FORM ACTION="/admin/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="8a1fd9d54140676f2fac1c488af64ca1"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="add-class"><INPUT TYPE="SUBMIT" VALUE="Add Class"></FORM>
    <FORM ACTION="/classes/" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Manage Classes"></FORM>
    </P>

    <H2 CLASS="title">Jobs</H2>

    <P>
    <FORM ACTION="/jobs/" METHOD="GET"><INPUT TYPE="SUBMIT" VALUE="Manage Jobs"></FORM>
    </P>
  </div>

I see a difference with the Manage Printers and Classes buttons, but also with Manage Jobs, only mange Job's show's the page requested and has also a "/?" in the url. The Ubuntu version 2.3.1. also shows a "/?" and works fine nevertheless.

So after pressing the 3 Manage buttons:
localhost:631/admin/? and localhost:631/printers/? produce both "Not Found".
localhost:631/jobs/? produces the Jobs page with buttons etc.

If I press for instance the Add Class button, it produces the url localhost/:631/admin and the right form, without anything further behind admin.

Think it's a minor bug? Something like a mismatch between post/get forms and the form that should respond.

Last edited by jorgenwiki (2024-06-02 09:05:10)

Offline

#4 2024-06-02 09:56:53

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,854

Re: cups web interface partialy broken [Solved]

Similar behaviour here using firefox when pressing 'manage printers' .

Using https://localhost:631/printers/ directly works fine.

falkon (uses qt6-webengine) has exactly the same behaviour .


$ curl http://localhost:631/ | grep href
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2262  100  2262    0     0  1679k      0 --:--:-- --:--:-- --:--:-- 2208k
    <link rel="stylesheet" href="/cups.css" type="text/css">
    <link rel="shortcut icon" href="/apple-touch-icon.png" type="image/png">
        <li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
        <li><a class="active" href="/">Home</a></li>
        <li><a href="/admin">Administration</a></li>
        <li><a href="/classes/">Classes</a></li>
        <li><a href="/help/">Help</a></li>
        <li><a href="/jobs/">Jobs</a></li>
        <li><a href="/printers/">Printers</a></li>
        <p>The standards-based, open source printing system developed by <a class="jumbolink" href="https://openprinting.github.io/" target="_blank">OpenPrinting</a> for Linux® and other Unix®-like operating systems. CUPS uses <a href="https://www.pwg.org/ipp/everywhere.html" target="_blank">IPP Everywhere™</a> to support printing to local and network printers.</p>
          <p><a href="help/overview.html">Overview of CUPS</a></p>
          <p><a href="help/options.html">Command-Line Printing and Options</a></p>
          <p><a href="help/admin.html">Adding Printers and Classes</a></p>
          <p><a href="help/policies.html">Managing Operation Policies</a></p>
          <p><a href="help/network.html">Using Network Printers</a></p>
          <p><a href="help/firewalls.html">Firewalls</a></p>
          <p><a href="help/man-cupsd.conf.html">cupsd.conf Reference</a></p>
          <p><a href="help/cupspm.html">CUPS Programming Manual</a></p>
          <p><a href="help/api-filter.html">Filter and Backend Programming</a></p>
$ 
$ curl http://localhost:631/printers/? | grep href
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2535    0  2535    0     0   189k      0 --:--:-- --:--:-- --:--:--  190k
    <link rel="stylesheet" href="/cups.css" type="text/css">
    <link rel="shortcut icon" href="/apple-touch-icon.png" type="image/png">
        <li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
        <li><a href="/">Home</a></li>
        <li><a href="/admin">Administration</a></li>
        <li><a href="/classes/">Classes</a></li>
        <li><a href="/help/">Help</a></li>
        <li><a href="/jobs/">Jobs</a></li>
        <li><a class="active" href="/printers/">Printers</a></li>
$ 

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2024-06-02 12:33:27

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,862

Re: cups web interface partialy broken [Solved]

Ah, I was looking at the wrong link, the offender is the

<form action="/printers/" method="GET"><input type="SUBMIT" value=""></form>

button which will open that url (all GET forms will), not the direct link in the top bar which is then not properly handled by the http server.

jorgenwiki has filed a bug already, https://github.com/OpenPrinting/cups/issues/972

Offline

#6 2024-06-03 16:04:10

jorgenwiki
Member
Registered: 2024-04-01
Posts: 25

Re: cups web interface partialy broken [Solved]

Bug is fixed in 2.4.8-2, just a few minutes ago

Offline

#7 2024-06-04 07:45:22

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,854

Re: cups web interface partialy broken [Solved]

Please prepend [Solved] to the thread title (edit first post) .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB