Commit Graph
5758 Commits
Author SHA1 Message Date
Sulka HaroandGitHub 593695459d Merge pull request #6836 from nightscout/dev
## Welcome to Release 14.2 Sweet Liquorice!

This release focuses on improving the overall security of Nightscout. 14.2 adds a new method for Nightscout to notify you of various security issues in your setup. After upgrading to the this release, if Nightscout wants to tell you something about the system security, you'll see a red megaphone appear in the Nightscout web client. To see the messages, you'll have to sign in using your API-SECRET or a token that's got administration privileges. Full details of the messages can be found in the Nightscout documentation: https://nightscout.github.io/nightscout/security/

Advance warning regarding future releases: we are likely to make compatibility breaking changes in upcoming releases that will change how the authentication flows with the Nightscout API works, along with changes to validation of data sent to Nightscout. If you're an app developer and are using the Nightscout APIs in your application, please join our Discord channel to learn about the changes are they're implemented. You can join the channel here: https://discord.gg/zg7CvCQ

Nightscout translations are now made in Crowdin. This is very easy even for non-technical folks, so please join and contribute! https://crowdin.com/project/nightscout

Note if you're running your instance with a very old MongoDB version, your installation might break. We've tested the release using MongoDB 4.2 and 4.4.

## New Features and Improvements

* Administration messages support
* Bolus bubble rendering in Nightscout UI is now more configurable, see the new Settings in the client settings panel
* You can now configure Nightscout to disable battery alarms during night
* Security improvement: treatments and CGM entries sent over the REST API V1 are now filtered for XSS injection code
* A lot of work has been put into localization, huge thanks to all the contributors
* Reports now remember the settings you've chosen across sessions
* Alexa integration now supports Spanish
* Fixed a bug with AAPS updating CGM values after Dexcom rounds the value
* Added support for Portuguese and Slovenian
* Support for Traditional Chinese has been removed until we find a contributor to help with translating more of the software. The next release will remove support for Japanese unless a larger portion of the text has been translated by time of release.

## For developers 

* APIV3 results are now wrapped differently from before
* Webpack was upgraded to V5
* Client JS bundling was simplified to just one bundle, cutting down bundling time to ~50% of current
* Removed cache invalidation token from bundling process and generating it on server boot
* Security improvement: generate strong persistent random string on deploy to use for JWT signing instead of api_secret
* Security improvement: moved api-secret and JWT signing to a separate centralized security component and deletes api_secret from environment, so it's not accessible elsewhere
* Security improvement: Clients can now send the api_secret using SHA512
* Moved some server components away from project root to make it easier to see what code runs in server vs client
* Fixes some issues reported by linter
14.2.0
2021-02-16 13:57:44 +02:00
Sulka HaroandGitHub f9c5a7cd08 New Crowdin updates (#6874)
* New translations en.json (Czech)

* New translations en.json (Czech)

* New translations en.json (Spanish)

* New translations en.json (Hungarian)

* New translations en.json (Hungarian)

* New translations en.json (Hungarian)
2021-02-16 12:49:33 +02:00
Sulka HaroandGitHub 37c7bf8350 New translations en.json (Romanian) (#6869) 2021-02-15 09:07:32 +02:00
Sulka HaroandGitHub 3d3a8ffc33 * Only run CodeQL in NS repo (#6873)
* Fix server.js location for Azure
2021-02-15 09:06:52 +02:00
Sulka HaroandGitHub 3cd149fc52 New Crowdin updates (#6858)
* New translations en.json (Greek)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Greek)

* New translations en.json (Hebrew)

* New translations en.json (Japanese)

* New translations en.json (Portuguese)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Slovak)

* Update source file en.json

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Greek)

* New translations en.json (Swedish)

* New translations en.json (Russian)

* New translations en.json (Romanian)

* New translations en.json (French)

* New translations en.json (Czech)

* New translations en.json (Danish)

* New translations en.json (Portuguese)

* New translations en.json (German)

* New translations en.json (Dutch)

* New translations en.json (Polish)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Polish)

* New translations en.json (Romanian)

* New translations en.json (Romanian)

* New translations en.json (Greek)

* New translations en.json (Finnish)

* New translations en.json (Russian)
2021-02-14 12:52:27 +02:00
Sulka Haro 9d2f9d44ea Fix version number generation 2021-02-11 17:32:35 +02:00
Sulka Haro c24d0f9ba4 Notify users if they're reusing the API_SECRET for Mongo password 2021-02-11 11:43:57 +02:00
Sulka HaroandGitHub 83d7fb2a82 New Crowdin updates (#6849)
* New translations en.json (Greek)

* New translations en.json (Dutch)

* New translations en.json (Swedish)

* New translations en.json (Russian)

* New translations en.json (Russian)

* New translations en.json (Greek)

* New translations en.json (Portuguese)
2021-02-10 17:53:55 +02:00
a9ec65aa12 Api3 remove Date header (#6855)
* APIv3: isolating documents from tests (not allowing clashes of calculated identifiers)

* removing unused async keyword

* fixing api v3 swagger and moving it to /api3-docs

* APIv3: finishing cache invalidation tests

Co-authored-by: Petr Ondrusek <petr.ondrusek@seznam.cz>
Co-authored-by: Petr Ondrůšek <petr.ondrusek@okin.eu>
Co-authored-by: Sulka Haro <sulka@sulka.net>
2021-02-10 17:53:34 +02:00
Sulka Haro 271c7ad375 Use password entropy analysis for determining password strength 2021-02-10 16:19:15 +02:00
Sulka Haro b128002cfa Fix Brazilian Portuguese language code 2021-02-09 16:37:14 +02:00
Sulka Haro 0653c1ec23 Remove broken header definition 2021-02-09 16:28:20 +02:00
Sulka Haro ebb58141cd Fix json decoding for some api endpoints 2021-02-09 12:52:23 +02:00
Sulka Haro 4d4b7b844d Fix form parsing 2021-02-08 22:08:20 +02:00
Sulka HaroandGitHub 6a044523a8 Cgm delta fix (#6848)
* If CGM value has changed, push it to server

* Fix VScode overeager code add

* Merge updated CGM data into client dataset
2021-02-08 19:28:49 +02:00
Sulka Haro 3103af71f3 Reduce the amount of false positives reported 2021-02-08 10:37:21 +02:00
Sulka Haro 4cfe045649 Fix bug with previous removal 2021-02-08 10:24:08 +02:00
Sulka Haro ed4a9cb674 Removes an undocumented feature that has a javascript injection vulnerability 2021-02-08 10:23:04 +02:00
Sulka Haro 4a9f492ea5 Fix issue reported by CodeQL 2021-02-08 10:10:17 +02:00
Sulka HaroandGitHub ba8286f00c New Crowdin updates (#6837)
* New translations en.json (Hebrew)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Spanish)

* New translations en.json (German)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Dutch)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Swedish)

* New translations en.json (Bulgarian)

* New translations en.json (Danish)

* New translations en.json (French)

* New translations en.json (Danish)

* New translations en.json (Greek)

* New translations en.json (Danish)

* New translations en.json (Greek)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* New translations en.json (Greek)

* New translations en.json (Greek)

* New translations en.json (Russian)

* Update source file en.json

* New translations en.json (Hebrew)

* New translations en.json (Japanese)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* New translations en.json (Spanish)

* New translations en.json (Greek)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Portuguese)

* New translations en.json (Norwegian Bokmal)

* Update source file en.json

* New translations en.json (Hebrew)

* New translations en.json (Japanese)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* Update source file en.json

* New translations en.json (Japanese)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Spanish)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* New translations en.json (French)

* New translations en.json (Greek)

* New translations en.json (Hebrew)

* New translations en.json (Japanese)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* Update source file en.json

* Update source file en.json

* New translations en.json (Slovenian)

* Update source file en.json

* New translations en.json (Hebrew)

* New translations en.json (Japanese)

* New translations en.json (Portuguese)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Slovak)

* Update source file en.json

* New translations en.json (Portuguese)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Greek)

* New translations en.json (French)

* New translations en.json (Portuguese)
2021-02-07 17:30:15 +02:00
1c349527a1 Update webpack to v5 (#6844)
* upgrade webpack info

* cleanup eslint findings

* fix eslint formatter stylish error

* lazy is invalid option for webpack dev middleware

* upgrade webpack to 5.x

* remove unsupported terser option

* fix missing process polyfill dependency

* try alternate proces fix

* fix css image reference

* add statements to import missing css files to index.html

* TerserPlugin no longer required

* add missing css links

* remove terser

Co-authored-by: Jeremy Cunningham <jpcunningh@gmail.com>
Co-authored-by: Sulka Haro <sulka@sulka.net>
2021-02-07 17:25:19 +02:00
Sulka Haro bc188d9163 * Disabling tests that interfere with other tests
* Fix view include syntax
* Change Slovenian name to correct language
2021-02-06 19:11:36 +02:00
Sulka Haro 157eddfe26 * Add Slovenian and fix Slovakian language code
* Hide Traditional Chinese due to low coverage
* Add Portuguese to the menu
2021-02-06 14:46:34 +02:00
Sulka Haro 5bf4d5134b * Better unit test for admin notifications.
* Localisable API_SECRET warning
* Fix admin message time display when message is recent
2021-02-06 14:25:19 +02:00
Sulka Haro 3230e59d21 Remove duplicate key 2021-02-06 09:12:31 +02:00
Sulka Haro 36dcf42b6a Change authentication dialog button label to be more descriptive 2021-02-06 09:05:05 +02:00
Sulka Haro 8ac5c5ada8 * Fix hard to understand loopalyzer localization key
* Fix websocket in unauthenticated cases
2021-02-05 14:08:26 +02:00
Sulka HaroandGitHub 5bc694d738 Add unit test for socket.io connect (#6845)
* Add unit test for socket.io connect

* Fix white space
2021-02-04 23:07:52 +02:00
Sulka Haro c65916c256 * Fix #6843
* Don't do sync file access on requests to swagger files or service worker
* Adds an API test
2021-02-04 21:46:30 +02:00
Sulka Haro f3147073d2 Fix admin message localization, timer presentation 2021-02-04 13:21:19 +02:00
Sulka Haro 2d6585d8d7 Revert to old token hash generation method 2021-02-03 15:28:31 +02:00
Sulka Haro 1c5a7e64df Fix Procfile, Dockerfile 2021-02-02 20:13:57 +02:00
Sulka Haro b3ccaf3505 Bump version to 14.2.0 2021-02-02 19:57:10 +02:00
Sulka HaroandGitHub d7e011d8f5 Refactoring organisation, bundling and security improvements (#6765)
* * Simplified bundling to just one bundle
* Removed cache invalidation token from bundling
* Generate strong persistent random string on deploy to use for JWT signing
* WIP: moving api-secret and JWT signing to a separate centralized security component
* Moved some server components away from project root
* Fix issues reported by linter

* Ignore detect-object-injection everywhere but the client

* Make admin message button red

* Remove alarms for some security alerts on code

* api_secret is now fully contained in the enclave
2021-02-02 19:53:30 +02:00
Sulka HaroandGitHub 3ab718ca37 New Crowdin updates (#6833)
* New translations en.json (Portuguese)

* New translations en.json (Spanish)

* New translations en.json (Hebrew)

* New translations en.json (Japanese)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Italian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* Update source file en.json

* New translations en.json (Finnish)

* New translations en.json (German)
2021-02-02 19:35:13 +02:00
6643eb9c20 Added a specific rendering for BG Check events on the Day to Day report. (#6530)
Added an option to hide BG Check and other events on the Day to Day report.

Co-authored-by: Sulka Haro <sulka@sulka.net>
2021-02-02 19:23:08 +02:00
d762694b83 Bolus settings (#6834)
* Add bolus plugin and restructure rendering settings

* Add setting to prevent automated micro boluses from triggering notifications and snoozing alarms

* clean up

* Small change to the bolus-settings branch so it supports flexible configuration that enables the old behavior

* Translations

* Fix settings default

Co-authored-by: Jason Calabrese <jason@cbrese.com>
2021-02-02 19:14:32 +02:00
84ac8f7e74 replace deprecated bodyParser ctor (#6819)
Co-authored-by: Sulka Haro <sulka@sulka.net>
2021-02-01 17:59:10 +02:00
Sulka HaroandGitHub 6587293855 New Crowdin updates (#6804)
* New translations en.json (Hebrew)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Dutch)

* New translations en.json (Swedish)

* New translations en.json (Czech)

* New translations en.json (Hungarian)

* New translations en.json (Croatian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Russian)

* New translations en.json (Chinese Simplified)

* New translations en.json (Bulgarian)

* New translations en.json (Greek)

* New translations en.json (Greek)

* New translations en.json (Portuguese)

* New translations en.json (Portuguese)

* New translations en.json (Portuguese)

* New translations en.json (Portuguese)
2021-02-01 17:51:17 +02:00
Sulka HaroandGitHub 04ca7b240b Unit test teardown improvements (#6821)
* Clear module require()s between tests
Clear profile cache between tests

* Fix authentication for careportal test

* Add logging to see where the careportal test gets to

* Even more logging for headless setup

* Change to use before and after in careportal test

* Add time logging

* Bump headless setup time to a full minute

* More timers to figure out what's slow in GA

* Bump up timeout on failing test
2021-02-01 17:50:48 +02:00
31e2010608 Update mongo-storage.js (#6811)
- use default time outs
- remove MongoDB_URI (including user name and password) from public error message
- fix typos

Co-authored-by: Sulka Haro <sulka@sulka.net>
2021-02-01 17:23:05 +02:00
b188a2a565 #6701 Report storage tests (#6814)
* #6701 Report storage tests

Functional and unit tests

* #6701 Test cleanup

* #6701 js-storage teardown

The first time js-storage is required it evaluates if it's running in the browser or not: https://github.com/julien-maurel/js-storage/blob/master/js.storage.js#L423 and will define the localstorage getters and setters accordingly. This becomes an issue if testing localstorage between UI and non-UI tests. reportstorage.test.js was requiring it before hashauth.test.js causing a conflict.

* #6701 false positive test

The page isn't refreshing

Co-authored-by: Sulka Haro <sulka@sulka.net>
2021-01-31 12:41:00 +02:00
CalebandGitHub cc873d8127 Typo correction for translation (#6805) 2021-01-29 10:40:34 +02:00
bassettbandGitHub c91ec78af4 Round insulin value in treatment tooltip (#6776)
* rename toFixedMin to toRoundedStr

* round the insulin value
2021-01-26 22:08:00 +02:00
Sulka HaroandGitHub 034eea9422 Changes the bundling so the site works on old Safari versions (#6800)
* Changes the bundling so the site works on old Safari versions

* Fix quotes

* Cache babel output for faster development
2021-01-26 22:05:28 +02:00
Sulka HaroandGitHub 1372d0c7c5 Catch error from websocket device status dedupe (#6777)
* Catch error from websocket device status dedupe

* Patch two more locations that don't catch errors correctly
2021-01-26 22:04:43 +02:00
Sulka HaroandGitHub c1dce74e50 New Crowdin updates (#6769)
* New translations en.json (Russian)

* New translations en.json (Romanian)

* New translations en.json (Bulgarian)

* New translations en.json (Finnish)

* New translations en.json (Hindi)

* New translations en.json (French)

* New translations en.json (Swedish)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Italian)

* New translations en.json (Slovenian)

* New translations en.json (Slovenian)

* New translations en.json (Arabic)

* New translations en.json (Greek)

* New translations en.json (French)

* New translations en.json (Bulgarian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Bulgarian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (French)

* New translations en.json (Croatian)

* New translations en.json (Italian)

* New translations en.json (French)

* New translations en.json (Italian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (German)

* New translations en.json (Hebrew)

* New translations en.json (Italian)

* New translations en.json (Hindi)

* New translations en.json (Croatian)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Slovenian)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Hungarian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Danish)

* New translations en.json (Czech)

* New translations en.json (Bulgarian)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Russian)

* New translations en.json (Swedish)

* New translations en.json (Greek)

* New translations en.json (Arabic)
2021-01-26 22:00:57 +02:00
d51a6745a3 #6701 Save report preferences (#6761)
Proof of concept to demonstrate saving report preferences

Co-authored-by: Sulka Haro <sulka@sulka.net>
2021-01-26 21:42:26 +02:00
85aea0fec5 Added sensor code transmitter ID fields (#6780)
* Copied #5442 - Duplicated @c-robertson's work

* Added tx id and sensor code to tooltip

* Added swagger docs for the new fields

* Added missing language keys

* Added new fields to sage plugin display

Co-authored-by: Sulka Haro <sulka@sulka.net>
2021-01-26 21:33:10 +02:00
CalebandGitHub 5aa98eeaf6 Implemented #6720 - Added es_ES template for Alexa (#6779) 2021-01-21 10:51:58 +02:00