tests/test-hgweb-auth.py.out
author Joerg Sonnenberger <joerg@bec.de>
Tue, 26 Jan 2021 00:19:36 +0100
changeset 46392 f25c770c217b
parent 40663 c53f0ead5781
child 46907 ffd3e823a7e5
permissions -rw-r--r--
debugshell: add a simple command for starting an interactive shell This simplifies interactive exploration of the Mercurial APIs. The ui and repo instances are provided as local variables. Differential Revision: https://phab.mercurial-scm.org/D9866
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8333
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
     1
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
     2
*** Test in-uri schemes
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
     3
37940
31c37e703cee tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com>
parents: 15024
diff changeset
     4
CFG: {b'x.prefix': b'http://example.org'}
8333
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
     5
URI: http://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
     6
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
     7
URI: http://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
     8
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
     9
URI: http://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    10
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    11
URI: https://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    12
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    13
URI: https://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    14
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    15
URI: https://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    16
     abort
15005
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    17
URI: https://x@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    18
     abort
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    19
URI: https://y@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    20
     abort
37940
31c37e703cee tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com>
parents: 15024
diff changeset
    21
CFG: {b'x.prefix': b'https://example.org'}
8333
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    22
URI: http://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    23
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    24
URI: http://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    25
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    26
URI: http://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    27
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    28
URI: https://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    29
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    30
URI: https://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    31
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    32
URI: https://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    33
     ('x', 'x')
15005
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    34
URI: https://x@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    35
     ('x', 'x')
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    36
URI: https://y@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    37
     abort
37940
31c37e703cee tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com>
parents: 15024
diff changeset
    38
CFG: {b'x.prefix': b'http://example.org', b'x.schemes': b'https'}
8333
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    39
URI: http://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    40
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    41
URI: http://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    42
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    43
URI: http://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    44
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    45
URI: https://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    46
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    47
URI: https://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    48
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    49
URI: https://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    50
     abort
15005
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    51
URI: https://x@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    52
     abort
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    53
URI: https://y@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    54
     abort
37940
31c37e703cee tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com>
parents: 15024
diff changeset
    55
CFG: {b'x.prefix': b'https://example.org', b'x.schemes': b'http'}
8333
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    56
URI: http://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    57
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    58
URI: http://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    59
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    60
URI: http://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    61
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    62
URI: https://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    63
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    64
URI: https://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    65
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    66
URI: https://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    67
     ('x', 'x')
15005
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    68
URI: https://x@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    69
     ('x', 'x')
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    70
URI: https://y@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    71
     abort
8333
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    72
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    73
*** Test separately configured schemes
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    74
37940
31c37e703cee tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com>
parents: 15024
diff changeset
    75
CFG: {b'x.prefix': b'example.org', b'x.schemes': b'http'}
8333
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    76
URI: http://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    77
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    78
URI: http://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    79
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    80
URI: http://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    81
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    82
URI: https://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    83
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    84
URI: https://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    85
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    86
URI: https://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    87
     abort
15005
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    88
URI: https://x@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    89
     abort
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    90
URI: https://y@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
    91
     abort
37940
31c37e703cee tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com>
parents: 15024
diff changeset
    92
CFG: {b'x.prefix': b'example.org', b'x.schemes': b'https'}
8333
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    93
URI: http://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    94
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    95
URI: http://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    96
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    97
URI: http://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    98
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
    99
URI: https://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   100
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   101
URI: https://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   102
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   103
URI: https://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   104
     ('x', 'x')
15005
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   105
URI: https://x@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   106
     ('x', 'x')
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   107
URI: https://y@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   108
     abort
37940
31c37e703cee tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com>
parents: 15024
diff changeset
   109
CFG: {b'x.prefix': b'example.org', b'x.schemes': b'http https'}
8333
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   110
URI: http://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   111
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   112
URI: http://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   113
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   114
URI: http://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   115
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   116
URI: https://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   117
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   118
URI: https://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   119
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   120
URI: https://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   121
     ('x', 'x')
15005
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   122
URI: https://x@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   123
     ('x', 'x')
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   124
URI: https://y@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   125
     abort
8333
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   126
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   127
*** Test prefix matching
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   128
37940
31c37e703cee tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com>
parents: 15024
diff changeset
   129
CFG: {b'x.prefix': b'http://example.org/foo', b'y.prefix': b'http://example.org/bar'}
8333
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   130
URI: http://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   131
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   132
URI: http://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   133
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   134
URI: http://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   135
     ('y', 'y')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   136
URI: https://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   137
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   138
URI: https://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   139
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   140
URI: https://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   141
     abort
15005
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   142
URI: https://x@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   143
     abort
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   144
URI: https://y@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   145
     abort
37940
31c37e703cee tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com>
parents: 15024
diff changeset
   146
CFG: {b'x.prefix': b'http://example.org/foo', b'y.prefix': b'http://example.org/foo/bar'}
8333
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   147
URI: http://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   148
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   149
URI: http://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   150
     ('y', 'y')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   151
URI: http://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   152
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   153
URI: https://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   154
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   155
URI: https://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   156
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   157
URI: https://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   158
     abort
15005
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   159
URI: https://x@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   160
     abort
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   161
URI: https://y@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   162
     abort
37940
31c37e703cee tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com>
parents: 15024
diff changeset
   163
CFG: {b'x.prefix': b'*', b'y.prefix': b'https://example.org/bar'}
8333
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   164
URI: http://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   165
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   166
URI: http://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   167
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   168
URI: http://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   169
     abort
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   170
URI: https://example.org/foo
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   171
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   172
URI: https://example.org/foo/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   173
     ('x', 'x')
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   174
URI: https://example.org/bar
89c80c3dc584 allow http authentication information to be specified in the configuration
Sune Foldager <cryo@cyanite.org>
parents:
diff changeset
   175
     ('y', 'y')
15005
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   176
URI: https://x@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   177
     ('x', 'x')
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   178
URI: https://y@example.org/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   179
     ('y', 'y')
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   180
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   181
*** Test user matching
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   182
37940
31c37e703cee tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com>
parents: 15024
diff changeset
   183
CFG: {b'x.password': b'xpassword', b'x.prefix': b'http://example.org/foo', b'x.username': None}
15005
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   184
URI: http://y@example.org/foo
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   185
     ('y', 'xpassword')
37940
31c37e703cee tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com>
parents: 15024
diff changeset
   186
CFG: {b'x.password': b'xpassword', b'x.prefix': b'http://example.org/foo', b'x.username': None, b'y.password': b'ypassword', b'y.prefix': b'http://example.org/foo', b'y.username': b'y'}
15005
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   187
URI: http://y@example.org/foo
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   188
     ('y', 'ypassword')
37940
31c37e703cee tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com>
parents: 15024
diff changeset
   189
CFG: {b'x.password': b'xpassword', b'x.prefix': b'http://example.org/foo/bar', b'x.username': None, b'y.password': b'ypassword', b'y.prefix': b'http://example.org/foo', b'y.username': b'y'}
15005
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   190
URI: http://y@example.org/foo/bar
4a43e23b8c55 hgweb: do not ignore [auth] if url has a username (issue2822)
Patrick Mezard <pmezard@gmail.com>
parents: 8333
diff changeset
   191
     ('y', 'xpassword')
15024
0f1311e829c9 http: strip credentials from urllib2 manager URIs (issue2885)
Patrick Mezard <pmezard@gmail.com>
parents: 15005
diff changeset
   192
40663
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   193
*** Test user matching with name in prefix
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   194
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   195
CFG: {b'x.password': b'xpassword', b'x.prefix': b'https://example.org/foo', b'x.username': None, b'y.password': b'ypassword', b'y.prefix': b'http://y@example.org/foo', b'y.username': b'y'}
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   196
URI: http://y@example.org/foo
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   197
     ('y', 'ypassword')
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   198
CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://z@example.org/foo', b'y.username': b'y'}
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   199
URI: http://y@example.org/foo
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   200
     abort
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   201
CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://z@example.org/foo'}
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   202
URI: http://y@example.org/foo
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   203
     abort
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   204
CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://y@example.org/foo', b'y.username': b'z'}
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   205
URI: http://y@example.org/foo
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   206
     abort
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   207
CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://y@example.org/foo'}
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   208
URI: http://y@example.org/foo
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   209
     ('y', 'ypassword')
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   210
CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://y@example.org/foo'}
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   211
URI: http://example.org/foo
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   212
     abort
c53f0ead5781 http: allow 'auth.prefix' to have a username consistent with the URI
Matt Harbison <matt_harbison@yahoo.com>
parents: 37940
diff changeset
   213
15024
0f1311e829c9 http: strip credentials from urllib2 manager URIs (issue2885)
Patrick Mezard <pmezard@gmail.com>
parents: 15005
diff changeset
   214
*** Test urllib2 and util.url
0f1311e829c9 http: strip credentials from urllib2 manager URIs (issue2885)
Patrick Mezard <pmezard@gmail.com>
parents: 15005
diff changeset
   215
0f1311e829c9 http: strip credentials from urllib2 manager URIs (issue2885)
Patrick Mezard <pmezard@gmail.com>
parents: 15005
diff changeset
   216
URIs: http://user@example.com:8080/foo http://example.com:8080/foo
0f1311e829c9 http: strip credentials from urllib2 manager URIs (issue2885)
Patrick Mezard <pmezard@gmail.com>
parents: 15005
diff changeset
   217
('user', '')