Skip to content

Commit 6f766ff

Browse files
committed
[_522][_523] review suggestions
1 parent 8a58bf7 commit 6f766ff

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

irods/connection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,8 @@ def _login_pam(self):
488488
if getattr(self,'DISALLOWING_PAM_PLAINTEXT',True):
489489
raise PlainTextPAMPasswordError
490490

491+
# In general authentication API, a ';' and '=' in the password would be misinterpreted due to those
492+
# characters' special meaning in the context string parameter.
491493
use_dedicated_pam_api = len(ctx) >= MAX_NAME_LEN or \
492494
{';','='}.intersection(set(new_pam_password))
493495

irods/test/PRC_issue_362.bats

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,8 @@
44
. $BATS_TEST_DIRNAME/scripts/funcs
55

66
setup() {
7-
local -A chars=(
8-
[semicolon]=";"
9-
[atsymbol]="@"
10-
[equals]="="
11-
[ampersand]="&"
12-
)
137
[ $BATS_TEST_NUMBER = 1 ] && echo "---" >/tmp/PRC_test_issue_362
148
local name=${BATS_TEST_DESCRIPTION##*_}
15-
CHR="${chars[$name]}"
169

1710
## Arrange for secrets file to be generated internally by the Python client
1811
cat >~/.python_irodsclient <<-EOF
@@ -43,13 +36,14 @@ setup() {
4336

4437
prc_test()
4538
{
39+
local CHR="$1"
4640
local USER="alissa"
4741
local PASSWORD="my${CHR}pass"
4842
sudo chpasswd <<<"$USER:$PASSWORD"
4943
env PYTHON_IRODSCLIENT_CONFIGURATION_PATH='' python ~/test_get_home_coll.py
5044
}
5145

52-
@test "test_with_atsymbol" { prc_test; }
53-
@test "test_with_semicolon" { prc_test; }
54-
@test "test_with_equals" { prc_test; }
55-
@test "test_with_ampersand" { prc_test; }
46+
@test "test_with_atsymbol" { prc_test "@"; }
47+
@test "test_with_semicolon" { prc_test ";"; }
48+
@test "test_with_equals" { prc_test "="; }
49+
@test "test_with_ampersand" { prc_test "&"; }

0 commit comments

Comments
 (0)