본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

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

자세히 살펴보기

Does the latest version of firefox (44.0) have a problem storing cookies where the name of the cookie contains a space?

  • 4 답장
  • 1 이 문제를 만남
  • 1 보기
  • 최종 답변자: Kohei

more options

Hi,

I have javascript code that is run to create certain cookies. Since updating to Firefox 44.0, it would seem cookies don't get stored if their name contains a space.

Cookie that does not get created anymore (space inbetween 'Full' and 'text': document.cookie="text_searchfield_ROW0LIBRIOS2SEARCHFIELD[Full text]=england; path=/";

There's a space because these names have to be generated dynamically.

This is causing a bit of stress as there's a lot of websites dependent on this.

Any feedback would be appreciated.

Adam.

Hi, I have javascript code that is run to create certain cookies. Since updating to Firefox 44.0, it would seem cookies don't get stored if their name contains a space. Cookie that does not get created anymore (space inbetween 'Full' and 'text': document.cookie="text_searchfield_ROW0LIBRIOS2SEARCHFIELD[Full text]=england; path=/"; There's a space because these names have to be generated dynamically. This is causing a bit of stress as there's a lot of websites dependent on this. Any feedback would be appreciated. Adam.

선택된 해결법

I have posted the site compatibility doc: https://www.fxsitecompat.com/en-CA/docs/2016/whitespaces-are-no-longer-allowed-in-cookie-names/

Yeah, some apps might be broken due to this change. Mozilla developers are now aware of the issue, and Firefox may allow spaces again for backward compatibility.

문맥에 따라 이 답변을 읽어주세요 👍 1

모든 댓글 (4)

more options

Maybe forget the bit about 'causing a bit of stress'. The code has been updated affecting my sites.

Definitely want to make you aware in case though.

more options

Perhaps this is a regression from a cookie-related security issue fixed with Firefox 44. But, I believe you have to encode the value anyway before being saved, because white spaces are not allowed. See https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie

Filed a bug to make sure this change is intentional.

글쓴이 Kohei 수정일시

more options

Thanks for the response Kohei.

I agree, we should have been encoding these names - we just didn't realise we weren't encoding them until version 44 stopped them from working.

I'm sure there'll be a few others getting caught out with this.

Thank you for you time.

more options

선택된 해결법

I have posted the site compatibility doc: https://www.fxsitecompat.com/en-CA/docs/2016/whitespaces-are-no-longer-allowed-in-cookie-names/

Yeah, some apps might be broken due to this change. Mozilla developers are now aware of the issue, and Firefox may allow spaces again for backward compatibility.