Skip to content

Commit

Permalink
Merge pull request #1913 from TryQuiet/chore/merge-master-to-develop
Browse files Browse the repository at this point in the history
Chore/merge master to develop
  • Loading branch information
vinkabuki authored Oct 4, 2023
2 parents 277f966 + b18a61b commit c7b4ce3
Show file tree
Hide file tree
Showing 28 changed files with 167 additions and 128 deletions.
5 changes: 3 additions & 2 deletions .github/secrets/decrypt_secrets.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/sh

set -e

gpg --quiet --batch --yes --decrypt --passphrase="$IOS_PROFILE_KEY" --output ./.github/secrets/match_AppStore_comquietmobile.mobileprovision ./.github/secrets/match_AppStore_comquietmobile.mobileprovision.gpg
gpg --quiet --batch --yes --decrypt --passphrase="$IOS_CERTIFICATE_KEY" --output ./.github/secrets/Certificates.p12 ./.github/secrets/Certificates.p12.gpg

mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles

cp ./.github/secrets/match_AppStore_comquietmobile.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/654a2214-095f-4939-a9e5-09f7a2ccf530.mobileprovision
cp ./.github/secrets/match_AppStore_comquietmobile.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/718ac015-309f-49b6-9653-f6cf84a6377c.mobileprovision


security create-keychain -p "" build.keychain
Expand All @@ -17,4 +19,3 @@ security unlock-keychain -p "" ~/Library/Keychains/build.keychain
security set-keychain-settings ~/Library/Keychains/build.keychain #this removes autolock

security set-key-partition-list -S apple-tool:,apple: -s -k "" ~/Library/Keychains/build.keychain

2 changes: 1 addition & 1 deletion .github/workflows/depencency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: 'Dependency Review'
uses: actions/dependency-review-action@6c5ccdad469c9f8a2996bfecaec55a631a347034 # v3.1.0
uses: actions/dependency-review-action@6c5ccdad469c9f8a2996bfecaec55a631a347034 # v3.1.0
2 changes: 1 addition & 1 deletion .github/workflows/deploy-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
-scheme Quiet \
-configuration Release \
-archivePath build/Quiet.xcarchive \
PROVISIONING_PROFILE="654a2214-095f-4939-a9e5-09f7a2ccf530" \
PROVISIONING_PROFILE="718ac015-309f-49b6-9653-f6cf84a6377c" \
CODE_SIGN_IDENTITY="Apple Distribution: Zbay LLC (CTYKSWN9T4)"
- name: Export .ipa
Expand Down
1 change: 1 addition & 0 deletions packages/backend-bundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline


# [1.7.0-alpha.0](/compare/backend-bundle@1.6.0...backend-bundle@1.7.0-alpha.0) (2023-08-29)
## [1.6.1](https://github.com/TryQuiet/quiet/compare/backend-bundle@1.6.0...backend-bundle@1.6.1) (2023-09-25)

**Note:** Version bump only for package backend-bundle

Expand Down
2 changes: 1 addition & 1 deletion packages/backend-bundle/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-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
"keywords": [],
"author": "",
"license": "ISC"
}
}
3 changes: 3 additions & 0 deletions packages/backend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.0.1-alpha.1](https://github.com/TryQuiet/backend/compare/@quiet/backend@2.0.1-alpha.0...@quiet/backend@2.0.1-alpha.1) (2023-09-25)
## [1.9.4](https://github.com/TryQuiet/backend/compare/@quiet/backend@1.9.3...@quiet/backend@1.9.4) (2023-10-03)

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

Expand All @@ -12,6 +13,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline


## [2.0.1-alpha.0](https://github.com/TryQuiet/backend/compare/@quiet/backend@2.0.0-alpha.5...@quiet/backend@2.0.1-alpha.0) (2023-09-25)
## [1.9.3](https://github.com/TryQuiet/backend/compare/@quiet/backend@1.9.2...@quiet/backend@1.9.3) (2023-10-03)

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

Expand All @@ -20,6 +22,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline


# [2.0.0-alpha.5](https://github.com/TryQuiet/backend/compare/@quiet/backend@2.0.0-alpha.4...@quiet/backend@2.0.0-alpha.5) (2023-09-19)
## [1.9.2](https://github.com/TryQuiet/backend/compare/@quiet/backend@1.9.1...@quiet/backend@1.9.2) (2023-09-25)

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

Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Up @@ -149,4 +149,4 @@
"ipfs-pubsub-peer-monitor": "vinkabuki/ipfs-pubsub-peer-monitor#038af76f22e6c902dab4a855b24273707ce17d94"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,14 @@ export class ConnectionsManagerService extends EventEmitter implements OnModuleI
this.registrationService.on(SocketActionTypes.SAVED_OWNER_CERTIFICATE, payload => {
this.serverIoProvider.io.emit(SocketActionTypes.SAVED_OWNER_CERTIFICATE, payload)
})
this.registrationService.on(RegistrationEvents.SPAWN_HS_FOR_REGISTRAR, async payload => {
const onionAddress = await this.tor.spawnHiddenService({
targetPort: payload.port,
privKey: payload.privateKey,
virtPort: payload.targetPort,
})
this.registrationService.onionAddress = onionAddress
})
this.registrationService.on(RegistrationEvents.ERROR, payload => {
emitError(this.serverIoProvider.io, payload)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Inject, Injectable } from '@nestjs/common'
import { EventEmitter, setMaxListeners } from 'events'
import fs from 'fs'
import path from 'path'
import crypto from 'crypto'
import PQueue, { AbortError } from 'p-queue'
import { decode, PBNode } from '@ipld/dag-pb'
import * as base58 from 'multiformats/bases/base58'
Expand Down Expand Up @@ -433,13 +434,20 @@ export class IpfsFileManagerService extends EventEmitter {
private async assemblyFile(fileMetadata: FileMetadata) {
const _CID = CID.parse(fileMetadata.cid)

const downloadDirectory = path.join(this.quietDir, 'downloads', fileMetadata.cid)
const downloadDirectory = path.join(this.quietDir, 'downloads')
createPaths([downloadDirectory])

const fileName = fileMetadata.name + fileMetadata.ext
const filePath = `${path.join(downloadDirectory, fileName)}`

const writeStream = fs.createWriteStream(filePath)
// As a quick fix, using a UUID for filename ensures that we never
// save a file with a malicious filename. Perhaps it's also
// possible to use the CID, however let's verify that first.
let fileName: string
let filePath: string
do {
fileName = crypto.randomUUID()
filePath = `${path.join(downloadDirectory, fileName)}`
} while (fs.existsSync(filePath))

const writeStream = fs.createWriteStream(filePath, { flags: 'wx' })

const entries = this.ipfs.cat(_CID)

Expand Down
16 changes: 14 additions & 2 deletions packages/backend/src/nest/registration/registration.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import Logger from '../common/logger'
@Injectable()
export class RegistrationService extends EventEmitter implements OnModuleInit {
private readonly logger = Logger(RegistrationService.name)
public onionAddress: string
private _server: Server
private _port: number
public registrationService: any
Expand All @@ -49,7 +50,9 @@ export class RegistrationService extends EventEmitter implements OnModuleInit {
}
await this.registerUser(csr)
})
this.setRouting()
// eslint-disable-next-line
const self = this
this.setRouting(self)
}

public setCertificates(certs: string[]) {
Expand All @@ -58,8 +61,17 @@ export class RegistrationService extends EventEmitter implements OnModuleInit {

private pendingPromise: Promise<RegistrarResponse> | null = null

private setRouting() {
private setRouting(self: any) {
// @ts-ignore
const middleware = function (req, res, next) {
const host = req.headers['host']
if (host !== self.onionAddress) {
return res.status(403).send('Access denied')
}
next()
}

this._app.use(middleware)
this._app.use(express.json())
this._app.post('/register', async (req, res): Promise<void> => {
if (this.pendingPromise) return
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/nest/socket/socket.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('SocketService', () => {

module.init()

client = io(`http://localhost:${TEST_DATA_PORT}`)
client = io(`http://127.0.0.1:${TEST_DATA_PORT}`)
})

afterAll(async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/nest/socket/socket.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export class SocketService extends EventEmitter implements OnModuleInit {
public listen = async (port = this.configOptions.socketIOPort): Promise<void> => {
return await new Promise(resolve => {
if (this.serverIoProvider.server.listening) resolve()
this.serverIoProvider.server.listen(this.configOptions.socketIOPort, () => {
this.serverIoProvider.server.listen(this.configOptions.socketIOPort, '127.0.0.1', () => {
this.logger(`Data server running on port ${this.configOptions.socketIOPort}`)
resolve()
})
Expand Down
3 changes: 3 additions & 0 deletions packages/desktop/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.0.1-alpha.1](https://github.com/ZbayApp/monorepo/compare/quiet@2.0.1-alpha.0...quiet@2.0.1-alpha.1) (2023-09-25)
## [1.9.4](https://github.com/TryQuiet/quiet/compare/quiet@1.9.3...quiet@1.9.4) (2023-10-03)

**Note:** Version bump only for package quiet

Expand All @@ -12,6 +13,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline


## [2.0.1-alpha.0](https://github.com/ZbayApp/monorepo/compare/quiet@2.0.0-alpha.12...quiet@2.0.1-alpha.0) (2023-09-25)
## [1.9.3](https://github.com/TryQuiet/quiet/compare/quiet@1.9.2...quiet@1.9.3) (2023-10-03)

**Note:** Version bump only for package quiet

Expand All @@ -20,6 +22,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline


# [2.0.0-alpha.12](https://github.com/TryQuiet/quiet/compare/quiet@2.0.0-alpha.11...quiet@2.0.0-alpha.12) (2023-09-20)
## [1.9.2](https://github.com/TryQuiet/quiet/compare/quiet@1.9.1...quiet@1.9.2) (2023-09-25)

**Note:** Version bump only for package quiet

Expand Down
2 changes: 1 addition & 1 deletion 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 @@ -302,4 +302,4 @@
"node": "18.12.1",
"npm": "8.19.2"
}
}
}
1 change: 1 addition & 0 deletions packages/e2e-tests/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.0.1-alpha.1](https://github.com/ZbayApp/monorepo/compare/e2e-tests@2.0.1-alpha.0...e2e-tests@2.0.1-alpha.1) (2023-09-25)
## [1.8.2](https://github.com/TryQuiet/quiet/compare/e2e-tests@1.8.1...e2e-tests@1.8.2) (2023-09-25)

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

Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Up @@ -46,4 +46,4 @@
},
"author": "",
"license": "ISC"
}
}
3 changes: 3 additions & 0 deletions packages/mobile/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.0.1-alpha.1](https://github.com/ZbayApp/monorepo/compare/@quiet/mobile@2.0.1-alpha.0...@quiet/mobile@2.0.1-alpha.1) (2023-09-25)
## [1.10.8](https://github.com/TryQuiet/quiet/compare/@quiet/mobile@1.10.7...@quiet/mobile@1.10.8) (2023-10-03)

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

Expand All @@ -12,6 +13,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline


## [2.0.1-alpha.0](https://github.com/ZbayApp/monorepo/compare/@quiet/mobile@2.0.0-alpha.15...@quiet/mobile@2.0.1-alpha.0) (2023-09-25)
## [1.10.7](https://github.com/TryQuiet/quiet/compare/@quiet/mobile@1.10.6...@quiet/mobile@1.10.7) (2023-10-03)

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

Expand All @@ -20,6 +22,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline


# [2.0.0-alpha.15](https://github.com/ZbayApp/monorepo/compare/@quiet/mobile@2.0.0-alpha.14...@quiet/mobile@2.0.0-alpha.15) (2023-09-22)
## [1.10.6](https://github.com/TryQuiet/quiet/compare/@quiet/mobile@1.10.5...@quiet/mobile@1.10.6) (2023-09-25)

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

Expand Down
5 changes: 2 additions & 3 deletions packages/mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ android {
applicationId "com.quietmobile"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 332
versionCode 335
versionName "2.0.1-alpha.1"
resValue "string", "build_config_package", "com.quietmobile"
testBuildType System.getProperty('testBuildType', 'debug')
Expand Down Expand Up @@ -322,7 +322,7 @@ dependencies {
// Work manager
implementation("androidx.work:work-runtime:2.7.1")
implementation("androidx.work:work-runtime-ktx:2.7.1")

// For animated GIF support
implementation 'com.facebook.fresco:fresco:2.6.0'
implementation 'com.facebook.fresco:animated-gif:2.6.0'
Expand Down Expand Up @@ -452,4 +452,3 @@ task "GenerateNodeNativeAssetsLists${abi_name}" {
tasks.getByPath(":${project.name}:preBuild").dependsOn "GenerateNodeNativeAssetsLists${abi_name}"

project.android.sourceSets.main.assets.srcDirs+="${rootProject.buildDir}/nodejs-native-assets/"

2 changes: 1 addition & 1 deletion packages/mobile/ios/Quiet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5405,7 +5405,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.quietmobile;
PRODUCT_NAME = Quiet;
PROVISIONING_PROFILE_SPECIFIER = CI;
PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.quietmobile";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.quietmobile";
SWIFT_OBJC_BRIDGING_HEADER = "Quiet-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down
Loading

0 comments on commit c7b4ce3

Please sign in to comment.