From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Fitzsimmons Newsgroups: gmane.emacs.bugs Subject: bug#35688: url-auth prompt is blank when realm is the empty string Date: Sat, 11 May 2019 16:38:27 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="54329"; mail-complaints-to="usenet@blaine.gmane.org" To: 35688@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 11 22:39:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hPYlz-000Dw8-8M for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 May 2019 22:39:11 +0200 Original-Received: from localhost ([127.0.0.1]:35077 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPYly-0004IC-Ap for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 May 2019 16:39:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPYlr-0004Hu-6q for bug-gnu-emacs@gnu.org; Sat, 11 May 2019 16:39:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hPYlq-0003O6-59 for bug-gnu-emacs@gnu.org; Sat, 11 May 2019 16:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55953) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hPYlq-0003Ny-1G for bug-gnu-emacs@gnu.org; Sat, 11 May 2019 16:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hPYlp-0004zx-Ud for bug-gnu-emacs@gnu.org; Sat, 11 May 2019 16:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Fitzsimmons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 May 2019 20:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35688 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.155760712319177 (code B ref -1); Sat, 11 May 2019 20:39:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 May 2019 20:38:43 +0000 Original-Received: from localhost ([127.0.0.1]:41260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hPYlX-0004zF-DZ for submit@debbugs.gnu.org; Sat, 11 May 2019 16:38:43 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44313) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hPYlU-0004z1-PQ for submit@debbugs.gnu.org; Sat, 11 May 2019 16:38:41 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:59935) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hPYlP-0003Ax-IZ for submit@debbugs.gnu.org; Sat, 11 May 2019 16:38:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPYlO-0004FE-Ep for bug-gnu-emacs@gnu.org; Sat, 11 May 2019 16:38:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hPYlL-00038y-GE for bug-gnu-emacs@gnu.org; Sat, 11 May 2019 16:38:34 -0400 Original-Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]:34969) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hPYlL-00038F-3K for bug-gnu-emacs@gnu.org; Sat, 11 May 2019 16:38:31 -0400 Original-Received: by mail-io1-xd30.google.com with SMTP id p2so7177359iol.2 for ; Sat, 11 May 2019 13:38:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fitzsim-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version; bh=J+KxRH/Wp2qIIMwaoeVovmIWFTn0SKi3SFwAtFfwzOY=; b=NUq4y+XtO68Tj4PC/+tGcWW6mfpB8N7hTtbckIM7pXY6V+dTev6Zy/I2hHz9hPifTz 3rE7wc+4qeW4hYNu6qjfDeiG/mIjTpFVEaGDOJ5UX7ftXSoHxTCpY5Id7iP1V352uvCl AuVhreaQ/U9RMMNqpavXgEBWARkvA3cI1CtPLtXU5jkQnvDPAJcxzP+G+6eT73KBJ+D8 chwUHcOD2JStXM8IUKrjB6LDe5v6v8txM5Bg8LqpfFCJEPscMzUgLp7rENeFFAw66Z5J EOdi6K34V17fCrbuN0kkjOCKhtnWx0j2zqqP8yrJsmaSR0CJ8X4PrTaPK2E7zU04qUJN wrHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=J+KxRH/Wp2qIIMwaoeVovmIWFTn0SKi3SFwAtFfwzOY=; b=XSml1SotszSSbWvw8Cudgzoqq8YepS50DCSw8cwMcvBtK53pnZVbVnkgK+ofBuytF5 yufe7Pn94e56fxfwmtEuc7RB3j4Puwa+BeWvN1uys68lAN6GjLABJxTH+gBvjciJkgtt bdOg3E7xOMdU8dR8OfysrJIIVDFHKo8DHFcJ/MQKqqp1cSMwb7DX1dAdjdIfgQRMu5jb MXs+JV+PQtsqDlvMkcmuZbMrkkIDaqceJLZXgfjUAo5F8+DZMjGo249R8krw3kQLYoFx n1FxS93v8p42klfqozAhwPKky5bw6Y79aijlxR2rJSFqHPGG+43Va4LOb3PwECP/R5yA W0Fg== X-Gm-Message-State: APjAAAXyTI2yuRJRREOQWWDLejUqKOHC1a2U13yUpbbkrhi25K+wLe9o dd45MLfoCMdtJyvFkyszRDIfJLC9Ypg= X-Google-Smtp-Source: APXvYqxyx7yq81snJwJUMk9ryZZQeIPCbBF7VuV1Pt0yJzDuvva1qNgcxwIyDXXkVrPxjMvu0ihC+Q== X-Received: by 2002:a6b:b7ce:: with SMTP id h197mr11299436iof.169.1557607109616; Sat, 11 May 2019 13:38:29 -0700 (PDT) Original-Received: from localhost.localdomain (69-165-165-189.dsl.teksavvy.com. [69.165.165.189]) by smtp.gmail.com with ESMTPSA id b18sm4334701itd.40.2019.05.11.13.38.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 May 2019 13:38:28 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:159098 Archived-At: Hi, When a website returns an empty string for realm, url-get-authentication prompts: Username [for ]: See for example: (url-retrieve-synchronously "https://outlook.office365.com/EWS/Exchange.asmx") The attached patch makes the prompt contain the full URL, and applies to all auth schemes. However, maybe each auth scheme should decide how to handle a "" realm and to fix this particular case I should just change url-basic-auth? I'm open to suggestions. Anyway, I'm filing this bug because I think prompting for a username and password while not showing the user the requested URL is a usability problem. Thomas diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index 0746cfd96c..f644787cc6 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el @@ -478,6 +478,8 @@ url-get-authentication if one cannot be found in the cache" (if (not realm) (setq realm (cdr-safe (assoc "realm" args)))) + (if (equal realm "") + (setq realm nil)) (if (stringp url) (setq url (url-generic-parse-url url))) (if (or (null type) (eq type 'any))