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

Change Math.random usages with an alternative #10238

Closed
6 tasks
MV88 opened this issue Apr 23, 2024 · 0 comments · Fixed by #10239 or #10245
Closed
6 tasks

Change Math.random usages with an alternative #10238

MV88 opened this issue Apr 23, 2024 · 0 comments · Fixed by #10239 or #10245

Comments

@MV88
Copy link
Contributor

MV88 commented Apr 23, 2024

Description

It was requested to substitute every usage of Math.random with an alternative like window.crypto.getRandomValues
for that we need to update two branches the

  • c039_math_random
  • master

What kind of improvement you want to add? (check one with "x", remove the others)

  • Minor changes to existing features
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Other useful information

@MV88 MV88 added this to the 2024.02.00 milestone Apr 23, 2024
@MV88 MV88 self-assigned this Apr 23, 2024
MV88 added a commit to MV88/MapStore2 that referenced this issue Apr 23, 2024
@MV88 MV88 linked a pull request Apr 23, 2024 that will close this issue
12 tasks
MV88 added a commit to MV88/MapStore2 that referenced this issue Apr 23, 2024
…tion

# Conflicts:
#	web/client/components/map/cesium/plugins/WMSLayer.js
#	web/client/components/style/vector/marker/SymbolLayout.jsx
#	web/client/plugins/TOC/components/Legend.jsx
#	web/client/utils/cesium/MathUtils.js
offtherailz added a commit that referenced this issue Apr 29, 2024
* Fix #10238 Change Math.random with an alternative solution

# Conflicts:
#	web/client/components/map/cesium/plugins/WMSLayer.js
#	web/client/components/style/vector/marker/SymbolLayout.jsx
#	web/client/plugins/TOC/components/Legend.jsx
#	web/client/utils/cesium/MathUtils.js

* add tests

* other replacement for master branch

* fix require paths

* fix paths

* Fix test

* change max number

* Fix math utils position

* fix path

* fix test

* Changed name into RandomUtils to avoid confusion

* Update web/client/utils/__tests__/RandomUtils-test.js

---------

Co-authored-by: Lorenzo Natali <lorenzo.natali@geosolutionsgroup.com>
MV88 added a commit that referenced this issue May 2, 2024
…0239)

* Fix #10238 Change Math.random with an alternative solution

* add tests

* fix test

* change max number

* fix math paths

* fix test

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