`sf org open` opens wrong user
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- node.js
- Lĩnh vực
- authentication, cli
Hướng nghiên cứu
Bắt đầu với lệnh sf org open và đường dẫn --browser của lệnh đó, sau đó kiểm tra hành vi xác thực được mô tả cho nhiều người dùng scratch org. Được xem là hoàn tất khi các lần mở lặp lại cho usr1, usr2 và usr3 luôn thiết lập phiên của người dùng được yêu cầu, thay vì sử dụng lại phiên của quản trị viên hoặc người dùng trình duyệt đầu tiên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
I created a few test users (usr1, usr2, usr3) on scratch org using sf org create user like this:
sf org user create -o tst -f .\config\user\def_adviser.json -a usr1
Successfully created user "[email protected]" with ID 005Ad00000FIZzaIAH for org 00DAd000008CqMPMA0.
See more details about this user by running "sf org user display -o [email protected]".
sf org user create -o tst -f .\config\user\def_adviser.json -a usr2
Successfully created user "[email protected]" with ID 005Ad00000FIaE5IAL for org 00DAd000008CqMPMA0.
See more details about this user by running "sf org user display -o [email protected]".
sf org user create -o tst -f .\config\user\def_adviser.json -a usr3
Successfully created user "[email protected]" with ID 005Ad00000FIaHJIA1 for org 00DAd000008CqMPMA0.
See more details about this user by running "sf org user display -o [email protected]".
and then I tried to login as those users using sf org open -o usr1 or usr2 or usr3.
Expected result
I should login as the specified user.
Actual result
It will ask me for password reset for specified user once, BUT log me in as scratch admin user. Even if I logged out of "User User" (the main user), sf org open would still open the main user and not the one I specify.
However, if I specified different browser using sf org open -o usr1 --browser edge, it will log me in as specified user BUT only for the first time.
Following attempt with different user will still open the first user:
sf org open -o usr3 --browser edge
If I logout from that user on Edge and try to login as usr3, it will still log me in as usr1.
If it's my first login as usr3, it will prompt me to change password for usr3 and still login as usr1, a user from which I logged out and which shouldn't have active session.
What's even more interesting is that usr3 will have this login in Login History, but usr1 does not, even though it logged me as usr1 and I act as usr1. This may hint some security issue present in Salesforce.
Additional information
- This is user definition file:
{
"FirstName": "Adviser",
"LastName": "Test1",
"TimeZoneSidKey": "Europe/London",
"LocaleSidKey": "en_US",
"EmailEncodingKey": "UTF-8",
"LanguageLocaleKey": "en_US",
"profileName": "Standard User"
}
-
Scratch Org was created using Org Shape, so I have more user licenses available than empty scratch org.
-
This started affecting our automated tests, which used to open specific test user and now open admin user instead.
System Information
CLI:
@salesforce/cli/2.102.6 win32-x64 node-v23.3.0
Plugin Version:
@oclif/plugin-autocomplete 3.2.34 (core)
@oclif/plugin-commands 4.1.32 (core)
@oclif/plugin-help 6.2.32 (core)
@oclif/plugin-not-found 3.2.64 (core)
@oclif/plugin-plugins 5.4.46 (core)
@oclif/plugin-search 1.2.28 (core)
@oclif/plugin-update 4.7.3 (core)
@oclif/plugin-version 2.2.32 (core)
@oclif/plugin-warn-if-update-available 3.1.46 (core)
@oclif/plugin-which 3.2.39 (core)
@salesforce/cli 2.102.6 (core)
agent 1.24.2 (core)
apex 3.6.19 (core)
api 1.3.3 (core)
auth 3.7.18 (core)
code-analyzer 5.0.0 (user)
community 3.3.8 (user)
custom-metadata 3.3.33 (user)
data 4.0.51 (core)
deploy-retrieve 3.22.38 (core)
dev 2.1.12 (user)
info 3.4.80 (core)
lightning-dev 2.10.2 (user)
limits 3.3.64 (core)
marketplace 1.3.8 (core)
org 5.9.22 (core)
packaging 1.22.1 (user)
schema 3.3.78 (core)
settings 2.4.42 (core)
sobject 1.4.68 (core)
telemetry 3.6.53 (core)
templates 56.3.60 (core)
trust 3.7.113 (core)
user 3.6.34 (core)
@salesforce/sfdx-scanner 4.7.0 (user)
sfdmu 4.33.17 (user)
sfdx-hardis 4.52.0 (user)
SF ENV. VARS.
SF_AUTOUPDATE_DISABLE,true
SF_DISABLE_AUTOUPDATE,true
SF_UPDATE_INSTRUCTIONS,Use "npm update --global @salesforce/cli" to update npm-based installations.
SF_BETA_TRACK_FILE_MOVES,true
Windows: true
Shell: powershell
Channel: stable
Diagnostics
✅ pass - salesforcedx plugin isn’t installed
✅ pass - you don't have any linked plugins
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org/
✅ pass - using latest or latest-rc CLI version
✅ pass - can access: https://test.salesforce.com
✅ pass - can access: https://appexchange.salesforce.com/services/data
✅ pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest
❌ fail - [@salesforce/plugin-auth] CLI supports v2 crypto
✅ pass - [@salesforce/plugin-auth] CLI using stable v1 crypto
✅ pass - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 571
- Fork
- 80
- Merge trung bình
- 1 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của forcedotcom/cli
-
sf agent mcp asset replace --assets null throws raw TypeError instead of InvalidShapeCó thể đã có người làm @konkonrong-lgtm đã nhận 67 ngày trước. Đang mởarea:afdx bug investigating owned by another team validated
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
forcedotcom/cli#3625 · 4 bình luận ·
-
area:afdx bug owned by another team
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
forcedotcom/cli#3608 · 2 bình luận ·
-
[BUG]: sf package version create always warns about org-capitalize-record-types, even when it's setĐang mởarea:packaging more information required owned by another team regression stale
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
forcedotcom/cli#3663 · 5 bình luận ·
-
[BUG]: NavigationMenu SourceMember name mismatch prevents source-tracked retrieve from completingĐang mởbug investigating validated
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
forcedotcom/cli#3660 · 3 bình luận ·
-
announcement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
forcedotcom/cli#3658 · 1 reaction ·
Tất cả issue của forcedotcom/cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
paperclipai/paperclip#16783 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Jeffy123-zhu/logspecter#20 ·
-
Blocklist removal requestĐang mởblocklist removal
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
MetaMask/eth-phishing-detect#303653 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: deploy good first issue security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày