Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web interface: certain actions yield blank pages #4538

Closed
michaelrsweet opened this issue Dec 1, 2014 · 2 comments
Closed

web interface: certain actions yield blank pages #4538

michaelrsweet opened this issue Dec 1, 2014 · 2 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 2.0-current
CUPS.org User: krabat

As of 2.x some actions within CUPS' web interface yield blank pages, apparently due to an issue that affects redirecting.

After initiating the respective action the usual steps are taken including those pages informing that the action was conducted successfully (which is always true, there's no real malfunction). But instead of redirecting to pages like ./printers/ there's a blank page.
Affected actions in that sense are on ./admin "Add Printer" (last step "Default Options"), "Add Class" and changes regarding those check boxes in section "Server Settings". As for the latter, it's the page informing about the server restarting that precedes the blank page. All options in drop-down "Administration" on ./classes/ and ./printers/ are affected, too.
Blank pages are always shown at addresses localhost:631/admin/?OP=redirect[?], the additional query strings are either &URL=/classes[/] or &URL=/printers[/] depending on action and type of object in question.

Seen on Arch Linux x86_64 with with 2.0.1 from the distro's package as well as compiled from the sources (cups.org) by simply running ./configure, make and make install.
Same findings using Firefox, Chromium and QupZilla.

Attaching error_log from changing a queue's default options, LogLevel set to debug, initial 5s break corresponding to the page telling changes were applied successfully.

Scope as stated above not sure as I can't test on different platforms, unfortunately.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

@michaelrsweet
Copy link
Collaborator Author

"str4538.patch":

Index: scheduler/client.c

--- scheduler/client.c (revision 12749)
+++ scheduler/client.c (working copy)
@@ -2159,6 +2159,9 @@
http_status_t code, /* I - Error code /
int auth_type)/
I - Authentication type */
{

  • char location[HTTP_MAX_VALUE]; /* Location field */

cupsdLogClient(con, CUPSD_LOG_DEBUG2, "cupsdSendError code=%d, auth_type=%d",
code, auth_type);

@@ -2191,8 +2194,12 @@

  • never disable it in that case.
    */
  • strlcpy(location, httpGetField(con->http, HTTP_FIELD_LOCATION), sizeof(location));

httpClearFields(con->http);

  • httpSetField(con->http, HTTP_FIELD_LOCATION, location);

if (code >= HTTP_STATUS_BAD_REQUEST && con->type != CUPSD_AUTH_NEGOTIATE)
httpSetKeepAlive(con->http, HTTP_KEEPALIVE_OFF);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant