Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

WWW-Authenticate prompt is not displaying realm

  • 11 답장
  • 1 이 문제를 만남
  • 10 보기
  • 최종 답변자: petermudge

more options

I have a web page which includes the following header:

WWW-Authenticate: Basic realm="xxxx"

where xxxx is a text string, the name of the realm. This header causes the browser to pop-up a dialogue box in which the user should enter a user name and password. The dialogue box is functioning correctly. However, there is a problem with what it displays. It should include the name of the realm ("xxxx" in this example), but it does not do so. It seems that this problem has only started occurring recently. Until a little while ago, the dialogue box used to include the sentence: 'The site says "xxxx".' Why does it no longer do so?

I have a web page which includes the following header: WWW-Authenticate: Basic realm="xxxx" where xxxx is a text string, the name of the realm. This header causes the browser to pop-up a dialogue box in which the user should enter a user name and password. The dialogue box is functioning correctly. However, there is a problem with what it displays. It should include the name of the realm ("xxxx" in this example), but it does not do so. It seems that this problem has only started occurring recently. Until a little while ago, the dialogue box used to include the sentence: 'The site says "xxxx".' Why does it no longer do so?

모든 댓글 (11)

more options

I don't know if I have used any servers that prompt in that way. This is what I get for IIS Windows Auth (I've covered the server name):

more options

Yes. That looks like the same problem that I'm getting. It shows the server name, but not the realm. I really want it to show the realm (like it used to do), because I've got several different realms on the same server.

more options

Sorry, I don't know how to test and compare since I don't configure servers. You could search for any bugs on file about this and, if needed, file a new one:

https://bugzilla.mozilla.org/

more options

I don't think it is a server problem. I think it's a browser problem. My evidence for this is that it works correctly with Internet Explorer. The IE pop-up text is

The server <server name> is asking for your user name and password. That server also reports "<name of realm>".

It is that second sentence (quoting the name of the realm) that seems to be missing with most other browsers (such as Firefox and Chrome).

more options

Right, I meant that I can't create a test case and look under the covers because I don't know how to set up such a prompt.

Do you have a lot of bandwidth and patience? You can run a regression test to isolate the patch responsible for the change:

https://mozilla.github.io/mozregression/

more options

Thanks. In principle, yes, I suppose I could try to do a regression test. However, I don't have especially great bandwidth (not sure about the patience). The test itself could be very simple. At its minimum, I think it just needs a tiny PHP file:

<?php
    header('WWW-Authenticate: Basic , realm="This is the text that should be displayed in the prompt."');
?>

글쓴이 cor-el 수정일시

more options

Sorry, my code doesn't seem to be displayed correctly. It should start with "".

more options

Thanks, you need to use the HTML entity (&lt;) when posting here:

<?php header('WWW-Authenticate: Basic , realm="This is the text that should be displayed in the prompt."'); ?>

more options

Trying again: It should start with "<?php" and end with "?>".

more options

Yes, I worked that out myself eventually!

more options

Actually, I see that what I sent you wasn't quite right. There's an extra comma that I tried inserting to see if it would fix the problem (which it didn't). The code should be:

<?php

   header('WWW-Authenticate: Basic realm="This is the text that should be displayed in the prompt."');

?>