diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 52d63c0..568333b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,12 +44,6 @@ jobs: uses: microsoft/setup-msbuild@v1.3.1 if: runner.os == 'Windows' - - name: Setup node for windows - if: runner.os == 'Windows' - shell: bash - run: | - yarn global add node-gyp@latest - # - name: sed it # if: runner.os == 'Windows' # shell: bash diff --git a/package.json b/package.json index e83d40b..9db835a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "main": "index.js", "name": "libsession_util_nodejs", "description": "Wrappers for the Session Util Library", - "version": "0.4.7", + "version": "0.4.8", "license": "GPL-3.0", "author": { "name": "Oxen Project", diff --git a/src/user_groups_config.cpp b/src/user_groups_config.cpp index 3d91247..5ba47ea 100644 --- a/src/user_groups_config.cpp +++ b/src/user_groups_config.cpp @@ -314,6 +314,10 @@ Napi::Value UserGroupsWrapper::setGroup(const Napi::CallbackInfo& info) { obj.Get("joinedAtSeconds"), "UserGroupsWrapper::setGroup joinedAtSeconds")) { group_info.joined_at = *joinedAtSeconds; } + // Probably an invalid timestamp. + if (group_info.joined_at > 9000000000) { + throw std::invalid_argument{"group.joined_at is too far in the future"}; + } if (auto invited = maybeNonemptyBoolean( obj.Get("invitePending"), "UserGroupsWrapper::setGroup invitePending")) {