Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whenever configuration is invalid, app crashes #884

Open
6 tasks done
claudiacrotti opened this issue Oct 30, 2024 · 1 comment
Open
6 tasks done

Whenever configuration is invalid, app crashes #884

claudiacrotti opened this issue Oct 30, 2024 · 1 comment
Labels
bug This points to a verified bug in the code waiting for customer This issue is waiting for a response from the issue or PR author

Comments

@claudiacrotti
Copy link

Checklist

Description

Because of the force unwrapping of the rsaPublicKey if any field in the JWK is invalid, the func verify( of the JWTAlgorithm crashes the app because of this line

return SecKeyVerifySignature(
     jwk.rsaPublicKey!, .rsaSignatureMessagePKCS1v15SHA256, data as CFData, signature as CFData, nil
)

Would it be possible to just have an early exit and return false?

Reproduction

Try to login with a wrong configuration, app crashes every time

Additional context

No response

Auth0.swift version

2.10.0

Platform

iOS

Platform version(s)

iOS 18.0

Xcode version

16.0

Package manager

Swift Package Manager

@claudiacrotti claudiacrotti added the bug This points to a verified bug in the code label Oct 30, 2024
@Widcket
Copy link
Contributor

Widcket commented Jan 10, 2025

Hi @claudiacrotti,

Could you please expand on your use case? How are you supplying an invalid JWKS, and to what end?

@Widcket Widcket added the waiting for customer This issue is waiting for a response from the issue or PR author label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code waiting for customer This issue is waiting for a response from the issue or PR author
Projects
None yet
Development

No branches or pull requests

2 participants