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

fix: Avoid destructuring connectionData when value is undefined #33339

Merged
merged 4 commits into from
Sep 24, 2024

Conversation

KevLehman
Copy link
Contributor

@KevLehman KevLehman commented Sep 23, 2024

Proposed changes (including videos or screenshots)

Issue(s)

SUP-672

Steps to test or reproduce

Further comments

#32620 introduced the bug, mainly for apps engine, which caused that when GDPR setting is enabled, new visitors cannot be created. This is because the server was trying to destructure connectionData, which was undefined.

The code on LivechatTyped was edited in a way that it was not checking connectionData to be an object before destructuring, causing the visitor creation to error out before completion.

Copy link
Contributor

dionisio-bot bot commented Sep 23, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Sep 23, 2024

🦋 Changeset detected

Latest commit: aa0cc52

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 32 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Sep 23, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-33339/
on branch gh-pages at 2024-09-24 18:07 UTC

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.85%. Comparing base (1d29a74) to head (aa0cc52).
Report is 1 commits behind head on release-6.13.0.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           release-6.13.0   #33339   +/-   ##
===============================================
  Coverage           58.85%   58.85%           
===============================================
  Files                2692     2692           
  Lines               65281    65281           
  Branches            14727    14727           
===============================================
  Hits                38424    38424           
  Misses              24387    24387           
  Partials             2470     2470           
Flag Coverage Δ
unit 77.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@KevLehman KevLehman added this to the 6.13 milestone Sep 24, 2024
@KevLehman KevLehman marked this pull request as ready for review September 24, 2024 12:04
@KevLehman KevLehman requested review from a team as code owners September 24, 2024 12:04
ricardogarim
ricardogarim previously approved these changes Sep 24, 2024
.changeset/brave-brooms-invent.md Outdated Show resolved Hide resolved
Co-authored-by: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com>
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider and removed stat: QA tested labels Sep 24, 2024
@KevLehman KevLehman added stat: QA tested and removed stat: QA assured Means it has been tested and approved by a company insider labels Sep 24, 2024
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Sep 24, 2024
@KevLehman KevLehman added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider labels Sep 24, 2024
@kodiakhq kodiakhq bot merged commit 519ed86 into release-6.13.0 Sep 24, 2024
9 of 10 checks passed
@kodiakhq kodiakhq bot deleted the fix/gdpr-connection-data-misbehaving branch September 24, 2024 18:03
@scuciatto
Copy link
Member

/patch

Copy link
Contributor

dionisio-bot bot commented Sep 24, 2024

Pull request #33348 added to Project: "Patch 6.12.2"

@scuciatto
Copy link
Member

/backport 6.11.4

Copy link
Contributor

dionisio-bot bot commented Sep 24, 2024

Pull request #33350 added to Project: "undefined"

pierre-lehnen-rc added a commit that referenced this pull request Sep 26, 2024
* Bump 6.12.1

* fix: message parser being slow to process very long messages with too many symbols (#33254)

Co-authored-by: Pierre Lehnen <55164754+pierre-lehnen-rc@users.noreply.github.com>

* fix: Allow to use the token from `room.v` when requesting transcript instead of finding visitor (#33242)

Co-authored-by: Kevin Aleman <11577696+KevLehman@users.noreply.github.com>

* fix: Retention Policy cached settings not updated during upgrade procedure (#33265)

Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com>

* fix: imported fixes (#33268)

Co-authored-by: Julio A. <52619625+julio-cfa@users.noreply.github.com>

* Release 6.12.1

[no ci]

* fix: Federation callback not awaiting model call (#33298)

* fix: correct parameter order in afterSaveMessage to restore outgoing webhooks and related features (#33295)

* feat: New endpoint for listing rooms & discussions from teams (#33177)

* chore: Update typings on callbacks to accept less than a full room object (#33305)

* fix: resolve avatar download issue on setUsername by refining service selection logic (#33193)

* feat: Allow managing association to business units on departments' creation and update (#32682)

* fix: Local avatars prioritized over external avatar provider and remove remnant references on client of `Accounts_AvatarExternalProviderUrl` (#33296)

Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com>

* fix: Mark as unread not working (#32939)

Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>

* refactor: Remove old `setreaction` callbacks and use new after/before callbacks (#33309)

* fix: `LivechatSessionTaken` webhook event called without `agent` param (#33209)

* fix: error on sendmessage stub (#33317)

* feat: contextualbar based on chat size (#33321)

* feat: `RoomSidepanel` (#33225)

Co-authored-by: Guilherme Gazzo <5263975+ggazzo@users.noreply.github.com>

* ci: auto candidate releases (#33325)

Co-authored-by: Diego Sampaio <chinello@gmail.com>

* refactor: Reactions set/unset (#32994)

* feat: E2EE messages mentions (#32510)

* fix: markdown inconsistency with bold and italics (#33157)

* fix: conference calls are shown as "not answered" after they end (#33179)

* Release 6.13.0-rc.0

* chore: update E2EE setting text (#33226)

* feat: Implement proper accessbility for report user modal (#33294)

Co-authored-by: Tasso Evangelista <2263066+tassoevan@users.noreply.github.com>

* fix: imported fixes (#33330)

* chore: create network broker package (#33338)

* feat: Adds new admin feature preview setting management (#33212)

Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>

* chore: move common files to core-services (#33341)

* regression: `Sidepanel` color highlight (#33342)

* feat: Adds new admin feature preview setting management (#33212)

Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>

* fix: Avoid destructuring `connectionData` when value is undefined (#33339)

* Release 6.13.0-rc.1

[no ci]

* chore: replace Meteor._localStorage -> Accounts.storageLocation (#33356)

* Bump rocket.chat to 6.14.0-develop (#33366)

* ci: use node20 for release action (#33343)

---------

Co-authored-by: rocketchat-github-ci <buildmaster@rocket.chat>
Co-authored-by: dionisio-bot[bot] <117394943+dionisio-bot[bot]@users.noreply.github.com>
Co-authored-by: Pierre Lehnen <55164754+pierre-lehnen-rc@users.noreply.github.com>
Co-authored-by: Kevin Aleman <11577696+KevLehman@users.noreply.github.com>
Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com>
Co-authored-by: Julio A. <52619625+julio-cfa@users.noreply.github.com>
Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
Co-authored-by: Kevin Aleman <kaleman960@gmail.com>
Co-authored-by: Ricardo Garim <rswarovsky@gmail.com>
Co-authored-by: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com>
Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
Co-authored-by: Martin Schoeler <martin.schoeler@rocket.chat>
Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
Co-authored-by: Júlia Jaeger Foresti <60678893+juliajforesti@users.noreply.github.com>
Co-authored-by: Guilherme Gazzo <5263975+ggazzo@users.noreply.github.com>
Co-authored-by: Diego Sampaio <chinello@gmail.com>
Co-authored-by: Hugo Costa <hugocarreiracosta@gmail.com>
Co-authored-by: csuadev <72958726+csuadev@users.noreply.github.com>
Co-authored-by: Henrique Guimarães Ribeiro <43561537+rique223@users.noreply.github.com>
Co-authored-by: Tasso Evangelista <2263066+tassoevan@users.noreply.github.com>
Co-authored-by: Lucas Pelegrino <lucas.pelegrino@icloud.com>
Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
gabriellsh added a commit that referenced this pull request Sep 26, 2024
…apped/composer-restriction

* 'develop' of github.com:RocketChat/Rocket.Chat: (55 commits)
  regression: `Sidepanel` sort requires refresh after room update (#33370)
  ci: use node20 for release action (#33343)
  Bump rocket.chat to 6.14.0-develop (#33366)
  chore: replace Meteor._localStorage -> Accounts.storageLocation (#33356)
  Release 6.13.0-rc.1
  fix: Avoid destructuring `connectionData` when value is undefined (#33339)
  feat: Adds new admin feature preview setting management (#33212)
  regression: `Sidepanel` color highlight (#33342)
  chore: move common files to core-services (#33341)
  feat: Adds new admin feature preview setting management (#33212)
  chore: create network broker package (#33338)
  fix: imported fixes (#33330)
  feat: Implement proper accessbility for report user modal (#33294)
  chore: update E2EE setting text (#33226)
  Release 6.13.0-rc.0
  fix: conference calls are shown as "not answered" after they end (#33179)
  fix: markdown inconsistency with bold and italics (#33157)
  feat: E2EE messages mentions (#32510)
  refactor: Reactions set/unset (#32994)
  ci: auto candidate releases (#33325)
  ...
gabriellsh added a commit that referenced this pull request Sep 30, 2024
…ocket.Chat into feat/airgapped-restrictions

* 'feat/airgapped-restrictions' of github.com:RocketChat/Rocket.Chat: (57 commits)
  fix: Async E2EE key exchange not working on develop (#33378)
  chore: Move Apps-Engine to monorepo (#32951)
  chore(Sidepanel): uses only local channels and discussions (#33387)
  chore: add gazzodown preview (#33279)
  fix: Avoid notifying `watch.settings` on uncaught errors (#33376)
  fix: race condition when forwarding livechat by splitting subscription removal (#33381)
  chore: Single Contact ID: improved typings and removed some duplicated code (#33324)
  ci: remove Jira-GitHub security integration (#33384)
  chore: add ui-composer to storybook (#33383)
  regression: `Sidepanel` sort requires refresh after room update (#33370)
  ci: use node20 for release action (#33343)
  Bump rocket.chat to 6.14.0-develop (#33366)
  chore: replace Meteor._localStorage -> Accounts.storageLocation (#33356)
  Release 6.13.0-rc.1
  fix: Avoid destructuring `connectionData` when value is undefined (#33339)
  feat: Adds new admin feature preview setting management (#33212)
  regression: `Sidepanel` color highlight (#33342)
  chore: move common files to core-services (#33341)
  feat: Adds new admin feature preview setting management (#33212)
  chore: create network broker package (#33338)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants