Skip to content

fix(service/icloud):Missing 'X-APPLE-WEBAUTH-USER cookie' and URL initialized failed#4029

Merged
Xuanwo merged 11 commits intoapache:mainfrom
bokket:main
Jan 22, 2024
Merged

fix(service/icloud):Missing 'X-APPLE-WEBAUTH-USER cookie' and URL initialized failed#4029
Xuanwo merged 11 commits intoapache:mainfrom
bokket:main

Conversation

@bokket
Copy link
Copy Markdown
Contributor

@bokket bokket commented Jan 19, 2024

No description provided.

… securely initialized

Signed-off-by: bokket <3100563328@qq.com>
@bokket bokket requested a review from Xuanwo as a code owner January 19, 2024 12:46
@github-actions github-actions bot added the releases-note/fix The PR fixes a bug or has a title that begins with "fix" label Jan 19, 2024
Signed-off-by: bokket <3100563328@qq.com>
}

if !self.data.cookies.is_empty() {
let cookies: Vec<String> = self
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this because reqwest automatically loads and sets cookies.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apple server will check 'X-APPLE-WEBAUTH-USER cookie' in cookies.If we don't update in authenticate request(setup.icloud.com/setup/ws/1) to keep value in seesionData,the next sign cookies are useless.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apple server will check 'X-APPLE-WEBAUTH-USER cookie' in cookies.If we don't update in authenticate request(setup.icloud.com/setup/ws/1) to keep value in seesionData,the next sign cookies are useless.

We don't need to. reqwest will handle COOKIES and SET-COOKIES headers exactly the same as you do here.

/// Get the drivews_url from signer session data.
/// Async await init finish.
pub async fn drivews_url(&mut self) -> Result<String> {
self.init().await?;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check self.initiated first. Or we can move the check into init() directly.

@bokket bokket requested a review from PsiACE as a code owner January 22, 2024 07:34
Signed-off-by: bokket <3100563328@qq.com>
Signed-off-by: bokket <3100563328@qq.com>
Signed-off-by: bokket <3100563328@qq.com>
Signed-off-by: bokket <3100563328@qq.com>
Copy link
Copy Markdown
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/fix The PR fixes a bug or has a title that begins with "fix"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants