Skip to content

Commit

Permalink
Merge branch 'develop' into feature/1897-psk
Browse files Browse the repository at this point in the history
  • Loading branch information
EmiM committed Nov 10, 2023
2 parents a15342d + 1e89199 commit d726933
Show file tree
Hide file tree
Showing 30 changed files with 139 additions and 140 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

* Backward incompatible change: use pre shared key as connection protector in libp2p. Add libp2p psk to invitation link

[2.0.3-alpha.1]

* Temporarily hiding leave community button from Possible impersonation attack

[2.0.3-alpha.0]

* Filter CSRs - remove old csrs and replace with new for each pubkey
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Encrypted p2p team chat with no servers, just Tor.
<br />
<!-- <a href="https://tryquiet.org"><strong>tryquiet.org »</strong></a> -->
<a href="https://github.com/TryQuiet/quiet/releases/tag/quiet%401.9.5"><strong>Downloads</strong></a> |
<a href="https://github.com/TryQuiet/quiet/releases/tag/quiet%401.9.6"><strong>Downloads</strong></a> |
<a href="#how-it-works"><strong>How it Works</strong></a> |
<a href="#features"><strong>Features</strong></a> |
<a href="https://github.com/TryQuiet/monorepo/wiki/Threat-Model"><strong>Threat Model</strong></a> |
Expand Down Expand Up @@ -52,7 +52,7 @@ See our [FAQ](https://github.com/TryQuiet/monorepo/wiki/Quiet-FAQ) for answers t

## Getting started

To try Quiet, download the [latest release](https://github.com/TryQuiet/quiet/releases/tag/quiet%401.9.5) for your platform (.dmg for macOS, .exe for Windows, etc.) and install it in the normal way. Then create a community and open the community's settings to invite members.
To try Quiet, download the [latest release](https://github.com/TryQuiet/quiet/releases/tag/quiet%401.9.6) for your platform (.dmg for macOS, .exe for Windows, etc.) and install it in the normal way. Then create a community and open the community's settings to invite members.

If you'd like to help develop Quiet, see [Contributing to Quiet](#contributing-to-quiet).

Expand Down
16 changes: 16 additions & 0 deletions packages/backend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.0.3-alpha.2](https://github.com/TryQuiet/backend/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-09)

**Note:** Version bump only for package @quiet/backend





## [2.0.3-alpha.1](https://github.com/TryQuiet/backend/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-08)

**Note:** Version bump only for package @quiet/backend





## [2.0.3-alpha.0](https://github.com/TryQuiet/backend/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-10-26)


Expand Down
16 changes: 8 additions & 8 deletions packages/backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quiet/backend",
"version": "2.0.3-alpha.0",
"version": "2.0.3-alpha.2",
"description": "tlg-manager",
"types": "lib/index.d.ts",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Time } from 'pkijs'
import { issueCertificate, extractPendingCsrs } from './registration.functions'
import { jest } from '@jest/globals'
import { createTmpDir } from '../common/utils'
import { RegistrationEvents } from './registration.types'

describe('RegistrationService', () => {
let module: TestingModule
Expand Down Expand Up @@ -146,4 +147,37 @@ describe('RegistrationService', () => {
expect(pendingCsrs.length).toEqual(1)
expect(pendingCsrs[0]).toBe(userCsr.userCsr)
})

it('wait for all NEW_USER events until emitting FINISHED_ISSUING_CERTIFICATES_FOR_ID', async () => {
registrationService.permsData = permsData

const eventSpy = jest.spyOn(registrationService, 'emit')

const userCsr = await createUserCsr({
nickname: 'alice',
commonName: 'nqnw4kc4c77fb47lk52m5l57h4tcxceo7ymxekfn7yh5m66t4jv2olad.onion',
peerId: 'Qmf3ySkYqLET9xtAtDzvAr5Pp3egK1H3C5iJAZm1SpLEp6',
dmPublicKey: 'testdmPublicKey',
signAlg: configCrypto.signAlg,
hashAlg: configCrypto.hashAlg,
})
const userCsr2 = await createUserCsr({
nickname: 'karol',
commonName: 'nnnnnnc4c77fb47lk52m5l57h4tcxceo7ymxekfn7yh5m66t4jv2olad.onion',
peerId: 'QmffffffqLET9xtAtDzvAr5Pp3egK1H3C5iJAZm1SpLEp6',
dmPublicKey: 'testdmPublicKey',
signAlg: configCrypto.signAlg,
hashAlg: configCrypto.hashAlg,
})

const csrs: string[] = [userCsr.userCsr, userCsr2.userCsr]
// @ts-ignore - fn 'issueCertificates' is private
await registrationService.issueCertificates({ certificates: [], csrs, id: 1 })

expect(eventSpy).toHaveBeenLastCalledWith(RegistrationEvents.FINISHED_ISSUING_CERTIFICATES_FOR_ID, {
id: 1,
})

expect(eventSpy).toHaveBeenCalledTimes(3)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ export class RegistrationService extends EventEmitter implements OnModuleInit {
return
}
const pendingCsrs = await extractPendingCsrs(payload)
pendingCsrs.forEach(async csr => {
await this.registerUserCertificate(csr)
})

await Promise.all(
pendingCsrs.map(async csr => {
await this.registerUserCertificate(csr)
})
)

if (payload.id) this.emit(RegistrationEvents.FINISHED_ISSUING_CERTIFICATES_FOR_ID, { id: payload.id })
}
Expand Down
19 changes: 19 additions & 0 deletions packages/desktop/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.0.3-alpha.2](https://github.com/TryQuiet/quiet/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-09)


### Bug Fixes

* trigger desktop ([2898bee](https://github.com/TryQuiet/quiet/commit/2898bee80bbf2f16cbda67281a29e47716faa77c))





## [2.0.3-alpha.1](https://github.com/TryQuiet/quiet/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-08)

**Note:** Version bump only for package @quiet/desktop





## [2.0.3-alpha.0](https://github.com/TryQuiet/quiet/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-10-26)


Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
},
"homepage": "https://github.com/TryQuiet",
"@comment version": "To build new version for specific platform, just replace platform in version tag to one of following linux, mac, windows",
"version": "2.0.3-alpha.0",
"version": "2.0.3-alpha.2",
"description": "Decentralized team chat",
"main": "dist/main/main.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,12 @@ const StyledGrid = styled(Grid)(({ theme }) => ({

export interface PossibleImpersonationAttackModalComponentProps {
communityName: string
leaveCommunity: () => void
open: boolean
handleClose: () => void
}

const PossibleImpersonationAttackModalComponent: React.FC<PossibleImpersonationAttackModalComponentProps> = ({
communityName,
leaveCommunity,
handleClose,
open,
}) => {
Expand All @@ -69,9 +67,7 @@ const PossibleImpersonationAttackModalComponent: React.FC<PossibleImpersonationA
<br />
<strong>This should never happen and we recommend leaving this community immediately!</strong>
</Typography>
<Button className={classes.button} data-testid='unregistered-button' onClick={leaveCommunity}>
Leave community
</Button>
{/* Temporarily hiding button - https://github.com/TryQuiet/quiet/issues/2025 */}
</StyledGrid>
</Modal>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { capitalizeFirstLetter } from '@quiet/common'
import { communities, users } from '@quiet/state-manager'
import React, { useEffect } from 'react'
import { useSelector } from 'react-redux'
import { clearCommunity } from '../../..'
import { useModal } from '../../../containers/hooks'
import { ModalName } from '../../../sagas/modals/modals.types'
import PossibleImpersonationAttackModalComponent from './PossibleImpersonationAttackModal.component'
Expand All @@ -19,22 +18,14 @@ const PossibleImpersonationAttackModalContainer = () => {
communityName = capitalizeFirstLetter(community.name)
}

const leaveCommunity = async () => {
await clearCommunity()
}

useEffect(() => {
if (duplicateCerts) {
possibleImpersonationAttackModal.handleOpen()
}
}, [duplicateCerts])

return (
<PossibleImpersonationAttackModalComponent
communityName={communityName}
leaveCommunity={leaveCommunity}
{...possibleImpersonationAttackModal}
/>
<PossibleImpersonationAttackModalComponent communityName={communityName} {...possibleImpersonationAttackModal} />
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const args: PossibleImpersonationAttackModalComponentProps = {
handleClose: function (): void {},
open: true,
communityName: 'devteam',
leaveCommunity: function (): void {},
}

Component.args = args
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ describe('PossibleImpersonationAttackModal', () => {
it('renderComponent', () => {
const result = renderComponent(
<ThemeProvider theme={theme}>
<PossibleImpersonationAttackModalComponent
handleClose={() => {}}
open={true}
communityName={'devteam'}
leaveCommunity={() => {}}
/>
<PossibleImpersonationAttackModalComponent handleClose={() => {}} open={true} communityName={'devteam'} />
</ThemeProvider>
)
expect(result.baseElement).toMatchInlineSnapshot(`
Expand Down Expand Up @@ -121,17 +116,6 @@ describe('PossibleImpersonationAttackModal', () => {
This should never happen and we recommend leaving this community immediately!
</strong>
</p>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium PossibleImpersonationAttackModalComponent-button css-1skytee-MuiButtonBase-root-MuiButton-root"
data-testid="unregistered-button"
tabindex="0"
type="button"
>
Leave community
<span
class="MuiTouchRipple-root css-8je8zh-MuiTouchRipple-root"
/>
</button>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react'
import { AnyAction, Dispatch, bindActionCreators } from 'redux'
import { useDispatch } from 'react-redux'

import UpdateModal from '../../../components/widgets/update/UpdateModal'
import updateHandlers from '../../../store/handlers/update'
import { useModal } from '../../hooks'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,5 @@ describe('Possible Impersonation Attack', () => {

const modal = screen.getByTestId('possible-impersonation-attack-modal-component')
expect(modal).toBeVisible()

const button = screen.getByTestId('unregistered-button')
expect(button).toBeVisible()
})
})
8 changes: 8 additions & 0 deletions packages/e2e-tests/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.0.2-alpha.1](https://github.com/TryQuiet/quiet/compare/[email protected]@2.0.2-alpha.1) (2023-11-08)

**Note:** Version bump only for package e2e-tests





## [2.0.2-alpha.0](https://github.com/TryQuiet/quiet/compare/[email protected]@2.0.2-alpha.0) (2023-10-26)

**Note:** Version bump only for package e2e-tests
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e-tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "e2e-tests",
"version": "2.0.2-alpha.0",
"version": "2.0.2-alpha.1",
"description": "For running end to end tests we use Selenium WebDriver (https://www.selenium.dev/documentation/webdriver/) with Electron ChromeDriver (https://www.npmjs.com/package/electron-chromedriver) in Jest",
"main": "index.js",
"private": true,
Expand Down
20 changes: 20 additions & 0 deletions packages/mobile/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.0.3-alpha.2](https://github.com/TryQuiet/quiet/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-09)

**Note:** Version bump only for package @quiet/mobile





## [2.0.3-alpha.1](https://github.com/TryQuiet/quiet/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-08)


### Bug Fixes

* fix UI ([#2021](https://github.com/TryQuiet/quiet/issues/2021)) ([0aac01d](https://github.com/TryQuiet/quiet/commit/0aac01da5a02c2ebef6839a7ab4542b99896df68))
* mobile popup back button ([#2023](https://github.com/TryQuiet/quiet/issues/2023)) ([b0c6e2d](https://github.com/TryQuiet/quiet/commit/b0c6e2d13f287124c52eec3ec85c07e80e2b057b))





## [2.0.3-alpha.0](https://github.com/TryQuiet/quiet/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-10-26)


Expand Down
Loading

0 comments on commit d726933

Please sign in to comment.