sustc icon indicating copy to clipboard operation
sustc copied to clipboard

[AuthInfo] Contradiction about possible senario in AuthInfo

Open Cypher-Bruce opened this issue 2 years ago • 2 comments

Describe your question

@WhatWEat

Question 1:

In #50, a composition of password and qq is possible.

比如,没有mid和微信,只有密码和qq,根据qq识别出来这个人的身份,然后看密码对不对,对了就能登陆,不对就不能。

But in #26, it is said this case will not happen.

Q: Could there be a composite validation with password and qq/wechat? (For example: An AuthInfo with mid, password and qq provided)
A: No.

Question 2:

Since the mid in AuthInfo is a long variable, it cannot be null. Then how should I interpret the answer in #26 about not providing a mid?

Q: Will mid be provided in the latter 3 validations?
A: We may or may not provide in different test cases.

Cypher-Bruce avatar Dec 21 '23 06:12 Cypher-Bruce

Sorry, there seems to have been some miscommunication. Now, addressing your queries:

Q1: We assure you that only one set of authentication information from either qq, wechat, mid, and password will be presented.

Q2: This can be determined from the default values of Java member variables. Since an uninitialized integer variable defaults to 0, any case where mid is 0 should be considered as 'mid not provided'. However, it is more advisable to consider mid <= 0 as 'mid not provided'.

WhatWEat avatar Dec 21 '23 08:12 WhatWEat

Thank you for your reply.

Cypher-Bruce avatar Dec 21 '23 08:12 Cypher-Bruce