Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nick Mathewson
Tor
Commits
5298113d
Unverified
Commit
5298113d
authored
Feb 12, 2020
by
teor
Browse files
Merge branch 'maint-0.3.5' into maint-0.4.1
parents
0ff3e8f4
b9c7c61e
Changes
6
Hide whitespace changes
Inline
Side-by-side
.travis.yml
View file @
5298113d
...
...
@@ -93,8 +93,6 @@ matrix:
os
:
osx
-
env
:
CHUTNEY="yes" CHUTNEY_ALLOW_FAILURES="2" SKIP_MAKE_CHECK="yes"
os
:
osx
## test-stem sometimes hangs on Travis
-
env
:
TEST_STEM="yes" SKIP_MAKE_CHECK="yes"
## (Linux only) Use a recent Linux image (Ubuntu Bionic)
dist
:
bionic
...
...
changes/bug32753
0 → 100644
View file @
5298113d
o Minor bugfixes (bridges):
- Lowercase the value of BridgeDistribution from torrc before adding it to
the descriptor. Fixes bug 32753; bugfix on 0.3.2.3-alpha.
changes/ticket33075
0 → 100644
View file @
5298113d
o Testing:
- Stop allowing failures on the Travis CI stem tests job. It looks like all
the stem hangs we were seeing are now fixed, but let's make sure we see
them if they happen again. Closes ticket 33075.
src/app/config/config.c
View file @
5298113d
...
...
@@ -6840,7 +6840,7 @@ check_bridge_distribution_setting(const char *bd)
};
unsigned
i
;
for
(
i
=
0
;
i
<
ARRAY_LENGTH
(
RECOGNIZED
);
++
i
)
{
if
(
!
strcmp
(
bd
,
RECOGNIZED
[
i
]))
if
(
!
strc
asec
mp
(
bd
,
RECOGNIZED
[
i
]))
return
0
;
}
...
...
src/feature/relay/router.c
View file @
5298113d
...
...
@@ -2911,15 +2911,20 @@ router_dump_router_to_string(routerinfo_t *router,
}
if
(
options
->
BridgeRelay
)
{
const
char
*
bd
;
char
*
bd
=
NULL
;
if
(
options
->
BridgeDistribution
&&
strlen
(
options
->
BridgeDistribution
))
{
bd
=
options
->
BridgeDistribution
;
bd
=
tor_strdup
(
options
->
BridgeDistribution
)
;
}
else
{
bd
=
"any"
;
bd
=
tor_strdup
(
"any"
)
;
}
if
(
strchr
(
bd
,
'\n'
)
||
strchr
(
bd
,
'\r'
))
bd
=
escaped
(
bd
);
// Make sure our value is lowercased in the descriptor instead of just
// forwarding what the user wrote in their torrc directly.
tor_strlower
(
bd
);
smartlist_add_asprintf
(
chunks
,
"bridge-distribution-request %s
\n
"
,
bd
);
tor_free
(
bd
);
}
if
(
router
->
onion_curve25519_pkey
)
{
...
...
src/test/test_config.c
View file @
5298113d
...
...
@@ -5621,11 +5621,27 @@ test_config_check_bridge_distribution_setting_not_a_bridge(void *arg)
static
void
test_config_check_bridge_distribution_setting_valid
(
void
*
arg
)
{
int
ret
=
check_bridge_distribution_setting
(
"https"
);
(
void
)
arg
;
tt_int_op
(
ret
,
OP_EQ
,
0
);
// Check all the possible values we support right now.
tt_int_op
(
check_bridge_distribution_setting
(
"none"
),
OP_EQ
,
0
);
tt_int_op
(
check_bridge_distribution_setting
(
"any"
),
OP_EQ
,
0
);
tt_int_op
(
check_bridge_distribution_setting
(
"https"
),
OP_EQ
,
0
);
tt_int_op
(
check_bridge_distribution_setting
(
"email"
),
OP_EQ
,
0
);
tt_int_op
(
check_bridge_distribution_setting
(
"moat"
),
OP_EQ
,
0
);
// Check all the possible values we support right now with weird casing.
tt_int_op
(
check_bridge_distribution_setting
(
"NoNe"
),
OP_EQ
,
0
);
tt_int_op
(
check_bridge_distribution_setting
(
"anY"
),
OP_EQ
,
0
);
tt_int_op
(
check_bridge_distribution_setting
(
"hTTps"
),
OP_EQ
,
0
);
tt_int_op
(
check_bridge_distribution_setting
(
"emAIl"
),
OP_EQ
,
0
);
tt_int_op
(
check_bridge_distribution_setting
(
"moAt"
),
OP_EQ
,
0
);
// Invalid values.
tt_int_op
(
check_bridge_distribution_setting
(
"x
\r
x"
),
OP_EQ
,
-
1
);
tt_int_op
(
check_bridge_distribution_setting
(
"x
\n
x"
),
OP_EQ
,
-
1
);
tt_int_op
(
check_bridge_distribution_setting
(
"
\t\t\t
"
),
OP_EQ
,
-
1
);
done:
return
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment