eugenp / tutorials

Getting Started with Spring Boot 3:
https://bit.ly/github-ls
MIT License
37.09k stars 54.4k forks source link

Missing test for Java Long.MAX_VALUE in angular-ui service #16056

Closed KarlDegen closed 4 weeks ago

KarlDegen commented 1 year ago

https://github.com/eugenp/tutorials/blame/5af7b8c289f3e4e2322fe4025cce9cbdaa24a6c1/spring-security-modules/spring-security-oauth2-bff/angular-ui/src/app/auth/user.service.ts#L66

My setup: Windows 10 64bit on Intel, JRE Azul 21 64bit

The current expression on Line 66

if (!!user.exp) {...}

is also true, if the resource server is sending Java Long.MAX-VALUE (9223372036854776000L) as substitute for 'no date', what also exceeds JavaScript's Number.MAX_SAFE_INTEGER

That leads into the browser recalling /bff/api/me over and over again without the wanted delay and max CPU consumption

eric-martin commented 4 weeks ago

This issue has been addressed and merged. Thanks for bringing this to our attention.