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

Cognito STS refused to be given to host application because bad compilation of cJSON #1474

Closed
2 tasks done
Zykino opened this issue Sep 24, 2020 · 4 comments
Closed
2 tasks done
Assignees
Labels
bug This issue is a bug. p2 This is a standard priority issue

Comments

@Zykino
Copy link

Zykino commented Sep 24, 2020

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
Full description can be fond on my StackOverflow question.

The TL;DR is that on a Qt app, with an Ubuntu configured with other locales than English, parsing the cognito credentials returns a bad value for the expiration which in turn return empty credentials to the application. This field look like this "Expiration":1.600435982E9 and cJSON is using strtod which is using the locale for decimal point (French decimal point is the comma ',' and not a dot '.').
By default cJSON is compiled with the use of local enabled but not in this SDK.

SDK version number
1.8.42

Platform/OS/Hardware/Device
Ubuntu 18.04, installed in English, set keyboard/date/numbers to French ones.

To Reproduce (observed behavior)
Please see the linked above stack overflow.

Expected behavior
Getting the STS token every-time. Whatever the environment is (Locales, Debugger, Qt, Android ?, ...)

Logs/output
Please see the linked above stack overflow.

Additional context
The cJSON version used in the SDK is quite old and should be updated/patched, for security reason if someone suddenly start to use cJSON_Minify at least.

@Zykino Zykino added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 24, 2020
@KaibaLopez
Copy link
Contributor

ohh, that's kind of interesting.
Yea, thanks for pointing this out we'll take a look at it.

@KaibaLopez KaibaLopez removed the needs-triage This issue or PR still needs to be triaged. label Sep 24, 2020
@KaibaLopez KaibaLopez added the needs-review This issue or pull request needs review from a core team member. label Aug 23, 2021
@jmklix jmklix self-assigned this Jul 15, 2022
@jmklix jmklix removed the needs-review This issue or pull request needs review from a core team member. label Jul 15, 2022
@jmklix jmklix added needs-review This issue or pull request needs review from a core team member. p2 This is a standard priority issue labels Mar 10, 2023
@jmklix
Copy link
Member

jmklix commented Mar 10, 2023

We have changed how this sdk builds and made some updates to cJSON. Can you confirm if this is still happening for you?

@jmklix jmklix added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days. and removed needs-review This issue or pull request needs review from a core team member. labels Mar 10, 2023
@Zykino
Copy link
Author

Zykino commented Mar 11, 2023

I don’t work there anymore. I think in the end we compiled the SDK with ENABLE_LOCALES so cJSON got it and compiled correctly.
I have no setup to check it now.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 2 days. label Mar 12, 2023
@jmklix jmklix closed this as completed Mar 13, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

3 participants