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

Cookie path may contain forbidde character #42823

Open
sgrekhov opened this issue Jul 24, 2020 · 1 comment
Open

Cookie path may contain forbidde character #42823

sgrekhov opened this issue Jul 24, 2020 · 1 comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-_http P2 A bug or feature request we're likely to work on

Comments

@sgrekhov
Copy link
Contributor

The following test fails now

import "dart:io";
import "../../../Utils/expect.dart";

main() {
  Cookie cookie = new Cookie.fromSetCookieValue(" cname = cval; path= / ");
  Expect.equals("/", cookie.path);
  Expect.throws(() {cookie.path = " /a/b/c:/; ";});
}

According to the RFC-6265

path-value = <any CHAR except CTLs or ";">

Therefore " /a/b/c:/; " is not a valid value for the path because it contains forbidden character ;
Tested on Dart SDK version: 2.10.0-0.0.dev (dev) (Wed Jul 22 19:58:38 2020 +0200) on "windows_x64"

@lrhn lrhn added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io labels Jul 24, 2020
@a-siva
Copy link
Contributor

a-siva commented Jul 24, 2020

/cc @zichangg

@a-siva a-siva added the P2 A bug or feature request we're likely to work on label Jul 24, 2020
dart-bot pushed a commit that referenced this issue Aug 22, 2020
Bug: #42823
Change-Id: Icb9e0fa84404acfe5c6f3c98014dae4cd16edf2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155843
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-_http P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

4 participants