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

An handled exception causes crash #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Undermaken
Copy link
Collaborator

@Undermaken Undermaken commented Sep 21, 2021

This PR adds the handling of exception that could cause crash
This could happen when the authorization URL is not valid (it depends on how it is set from outside)

the unhandled exception

io.reactivex.exceptions.UndeliverableException: The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with.

more details https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling

how to reproduce

  • force the authorization URI to this invalid URI (setUrl(url))
https://idserver.servizicie.interno.gov.it/OpenApp?nextUrl=https://idserver.servizicie.interno.gov.it/idp/Authn/X509&name=conversation&value=e1s2&authnRequestString=_ec725700fad278600a2a&OpText=Inserisci le ultime 4 cifre del PIN ricevute insieme alla tua Carta di Identità Elettronica per accedere a https://app-backend.io.italia.it&imgUrl=https://idserver.servizicie.interno.gov.it/idpimages/cielogo.pngshould
  • set the PIN of your CIE card
  • read your NFC card
  • 💥

⛑️ special thanks to @fabriziofff to find this issue
pagopa/io-cie-sdk#37

This PR adds the handling of exception that could cause crash
This could happen when the authorization URL is not valid (it depends on how it is set from outside)

### how to reproduce
- force the authorization URI to this invalid URI (`setUrl(url)`)
```
https://idserver.servizicie.interno.gov.it/OpenApp?nextUrl=https://idserver.servizicie.interno.gov.it/idp/Authn/X509&name=conversation&value=e1s2&authnRequestString=_ec725700fad278600a2a&OpText=Inserisci le ultime 4 cifre del PIN ricevute insieme alla tua Carta di Identità Elettronica per accedere a https://app-backend.io.italia.it&imgUrl=https://idserver.servizicie.interno.gov.it/idpimages/cielogo.pngshould
```
- set the PIN of your CIE card
- read your NFC card
- 💥 

⛑️  special thanks to @fabriziofff to find this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant