Commit graph

1979 commits

Author SHA1 Message Date
k9ert
e9dc494d22
Kn/macos signing (#2432)
* chore: migrate from altool to notarytool

* fix litte things in build-common

* add pyenv install in build-osx

* add pyinstaller/electron/signing_logs to gitignore

* chore: migrate from altool to notarytool

* fix little things in build.common

* add pyenv install in build osx

* add pyinatsller electron signing logs to gitignore

* updated build-osx.sh

* fix entitlement

* heavily refactoring the electron app

* polish and improve

* further bugfixing and polishing

* tiny change to improve support of MacOS

* Fix dependency issues

---------

Co-authored-by: Manolis <moneymanolis@protonmail.com>
2024-05-01 12:31:32 +02:00
Manolis Mandrapilias
7970c3d8ab
Fix Jade signing issues with Swan Vault (#2421)
* update jade api to version 2.0.2 and update jade hwi client to the latest hwi code (version

* change chain default for initialising the jade client back to MAIN

* add "unlock" to jade's enumerate method and its hwi client

* use is_startup property to prevent jade unlocking on startup + change to skip_hwi_initialisation + some simplifications

* pass chain param on every request for enumerate call as well + some changes to be on the safe side (avoid name collusion with built-in fetch + random id)

* always use timeout when calling enumerate from hwi.jinja

* add ui to register multisigs for multisig wallets using a jade

* updated requirements.txt

* rename myFetch to requestToHwiBridge

* address jamie's comments: change logic to skip_unlocking + move early return up in jade client
2024-03-27 20:19:25 +01:00
j0sh21
a0523732aa
New documentations #1885 (#2409)
* Added install guide 1884

https://github.com/cryptoadvance/specter-desktop/issues/1884

* chore: remove empty file

* adding to the menu anr referencing in readme

* changing heading levels to enable submenu

* adding symlink

* Reposition 'OS-Specific Apps' section and update Electrum integration info

- Moved 'OS-Specific Apps for Specter Desktop' section to immediately follow 'Installation Methods' for better logical flow and prominence.
- Added information about Electrum connection availability since version 2.0.0 in the 'Future Developments of Specter Desktop' section for up-to-date and accurate documentation.
-Changed Title to "Installation Method Decision Guide" instead of "Installation Guide"

* Create WalletCreationGuide.md

* Create DeviceCreationGuide.md

* Update docs/DeviceCreationGuide.md

commit suggestion from k9ert

Co-authored-by: k9ert <k9ert@gmx.de>

* Update mkdocs.yml

Linked new WalletCreationGuide and DeviceCreationGuide in the Menue

* Update WalletCreationGuide.md

Added Link to install guide

* Update WalletCreationGuide.md

Added Link to Node connection guide

* Update WalletCreationGuide.md

Creating wallet: Reference to import device first
Backup wallet: Improved explenation about steel backup

* Update DeviceCreationGuide.md

Added real world examples for wallets and derivation paths.
Linked readme with pictured Step by Step guide.
Added Some basic Common Issues, maybe link faq?

* Update WalletCreationGuide.md

Added examples for Single/Multisig wallets

* Update DeviceCreationGuide.md

small fix in hierarchy

* Update mkdocs.yml

swapped device and wallet creation guide.

* Update DeviceCreationGuide.md

Fixed various comments

* Update WalletCreationGuide.md

var. fixes

* Added feedback from 02/15

* Added feedback from 02/15
fix double space and no new line.

* - removed the word cryptocurrency and placed Bitcoin instead.
- Pointed out that hardware wallets with shitcoin support are less secure.

* - fixed links to other docs
- adjusted link integration
- removed picture reference in the wallets overview

---------

Co-authored-by: Kim Neunert <kim@swanbitcoin.com>
Co-authored-by: k9ert <k9ert@gmx.de>
2024-02-27 13:51:23 +01:00
k9ert
655e9153b6
Enforce hwi init (#2386)
* adding release_notes for v2.0.2

* add --enforcehwiinitialisation as click option

* chore: ENFORCE_HWI_INITIALISATION_AT_STARTUP via
2024-01-15 14:00:23 +01:00
k9ert
1f0bc602c7
chore: upgrade dependencies (#2399)
* chore: upgrade dependencies

* workaround for weird greenlet error

* chore: remove empty file
2024-01-15 11:31:20 +01:00
JumbledUp
0d22f8d570
Docs: fix small typos and grammatical errors (#2406) 2024-01-13 16:28:12 +01:00
Sergev ₱
3b1003941c
Patched Fix Improperly Controlled Modification of Prototype Pollution in specter-desktop (#2385)
A constructed payload sent to validate will lead to prototype pollution. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as `__proto__`, constructor and prototype. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.

```js
	function checkObj(instance,objTypeDef,path,additionalProp){

		if(typeof objTypeDef =='object'){
			if(typeof instance != 'object' || instance instanceof Array){
				errors.push({property:path,message:"an object is required"});
			}
			
			for(var i in objTypeDef){ 
				if(Object.prototype.hasOwnProperty.call(objTypeDef, i) && i != '__proto__' && i != 'constructor'){
					var value = Object.prototype.hasOwnProperty.call(instance, i) ? instance[i] : undefined;
					// skip _not_ specified properties
					if (value === undefined && options.existingOnly) continue;
					var propDef = objTypeDef[i];
					// set default
					if(value === undefined && propDef["default"]){
						value = instance[i] = propDef["default"];
					}
					if(options.coerce && i in instance){
						value = instance[i] = options.coerce(value, propDef);
					}
					checkProp(value,propDef,path,i);
				}
			}
		}
		for(i in instance){
			if(Object.prototype.hasOwnProperty.call(instance, i) && !(i.charAt(0) == '_' && i.charAt(1) == '_') && objTypeDef && !objTypeDef[i] && additionalProp===false){
				if (options.filter) {
					delete instance[i];
					continue;
				} else {
					errors.push({property:path,message:"The property " + i +
						" is not defined in the schema and the schema does not allow additional properties"});
				}
			}
			var requires = objTypeDef && objTypeDef[i] && objTypeDef[i].requires;
			if(requires && !(requires in instance)){
				errors.push({property:path,message:"the presence of the property " + i + " requires that " + requires + " also be present"});
			}
			value = instance[i];
			if(additionalProp && (!(objTypeDef && typeof objTypeDef == 'object') || !(i in objTypeDef))){
				if(options.coerce){
					value = instance[i] = options.coerce(value, additionalProp);
				}
				checkProp(value,additionalProp,path,i);
			}
			if(!_changing && value && value.$schema){
				errors = errors.concat(checkProp(value,value.$schema,path,i));
			}
		}
		return errors;
	}
```

## Proof of Concept
```js
// PoC.js
const { validate } = require("json-schema");
const instance = JSON.parse(`
{
  "$schema":{
    "type": "object",
    "properties":{
      "__proto__": {
        "type": "object",
        
        "properties":{
          "polluted": {
              "type": "string",
              "default": "polluted"
          }
        }
      }
    },
    "__proto__": {}
  }
}`);

const a = {};
console.log(a.polluted);
validate(instance);
console.log(a.polluted);
```
**Impact**
This vulnerability is capable of make prototype pollution
CWE-915
CWE-1321
CVE-2021-3918
**`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`**

Co-authored-by: k9ert <k9ert@gmx.de>
2023-11-16 17:28:57 +01:00
Manolis Mandrapilias
b85cf745f8
Fix testnet path when deleting wallet on node (#2395) 2023-11-14 14:16:53 +01:00
k9ert
3301accc5b
adding release_notes for v2.0.2 (#2384) 2023-09-21 20:15:45 +02:00
Benjamin B
6a51d31bbe
Update spotbit api url and path (#2372)
* Update spotbit api url and path

* Update src/cryptoadvance/specter/util/price_providers.py

Co-authored-by: Benjamin B <7598058+BBlackwo@users.noreply.github.com>

* removed non-existent price-provider and added gemini

* fixed history API

---------

Co-authored-by: k9ert <k9ert@gmx.de>
Co-authored-by: Kim Neunert <kim@swanbitcoin.com>
2023-09-20 14:00:29 +02:00
k9ert
8a06e9b716
Optional ENFORCE_HWI_INITIALISATION_AT_STARTUP (#2383)
* Revert "revert removal of enumerate (#2378)"

This reverts commit 23ad11975b.

* Make HWI initialisation not default but enforcable
2023-09-20 11:40:41 +02:00
Sergev ₱
2c8e5533a0
Patched Fix Electron vulnerable to out-of-package code execution when launched with arbitrary cwd (#2380)
This project used electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS. Affected of this project are vulnerable to Arbitrary Code Execution allowing out-of-package code execution when apps are launched as command-line executables.

```diff
diff --git a/lib/internal/modules/run_main.js b/lib/internal/modules/run_main.js
- index 5a50d5d6afab6e6648f72a1c0efa1df4cd80bcd9..0be45309028b00a6957ee473322a9452a7fa7d67 100644
--- a/lib/internal/modules/run_main.js
+ +++ b/lib/internal/modules/run_main.js
@@ -13,6 +13,12 @@ const {
```
CWE-94
`CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:L`
CVE-2023-39956

Co-authored-by: k9ert <k9ert@gmx.de>
2023-09-19 13:48:22 +02:00
Manolis Mandrapilias
1f40a3b060
Bugfix: Jade displaying wrong multisig addresses for descriptors using multi() (#2366)
* condition on is_sorted in jade's display_multisig_address

* fix overlay for address confirmation

---------

Co-authored-by: k9ert <k9ert@gmx.de>
2023-09-16 10:32:42 +02:00
k9ert
23ad11975b
revert removal of enumerate (#2378) 2023-09-08 16:39:18 +02:00
Stepan Snigirev
2808be1ae3
remove enumerate in HWIBridge init (#2371)
* remove enumerate in HWIBridge init

* fix test
2023-09-05 11:16:33 +02:00
Manolis Mandrapilias
622e111ba0
Bugfix: Add missing signet key (#2368)
* add missing signet key
* fix rpc tests
2023-08-23 17:05:39 +02:00
k9ert
72fed92dd5
updating flask_babel fixes #2218 (#2359)
* updating flask_babel fixes #2218

* changes according to #2218

* fixes according to release-notes

* black
2023-07-27 14:38:37 +02:00
k9ert
f8383ac9e6
fixes #2319 (#2330)
Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>
2023-07-21 15:12:33 +02:00
dependabot[bot]
ec2f3e5124
Chore(deps): Bump semver from 6.3.0 to 6.3.1 in /pyinstaller/electron (#2352)
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: k9ert <k9ert@gmx.de>
2023-07-21 14:29:38 +02:00
k9ert
78fe940f73
remove SpecterUri (#2358) 2023-07-21 13:18:57 +02:00
dependabot[bot]
ecf614f4fa
Chore(deps): Bump semver from 5.7.1 to 5.7.2 (#2353)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: k9ert <k9ert@gmx.de>
2023-07-21 12:46:53 +02:00
Manolis Mandrapilias
bc4a51b64c
Chore: Regex change to capture labels in wallet data imports better (#2357) 2023-07-20 14:58:19 +02:00
Manolis Mandrapilias
4bbd56e523
Fix JSON parsing issues when copy & pasting wallet data from PDF (#2355)
* remove any newline characters when users pastes wallet jsons
* make regex for cleaning text more comprehensive
2023-07-20 14:11:16 +02:00
zealsham
8f9c95fe1b
Security: Fix login open redirect due to next parameter manipulation (#2350)
* fix login  open redirect due to next parameter manipulation
2023-07-07 14:31:54 +02:00
Manolis Mandrapilias
9261245faf
Feature: Enable import of a multisig wallet that uses a multi-descriptor (#2349)
* Use imported descriptor for wallet creation and delete old_format

* test for new descriptor util function

* copy changes backup pdf

* add uses_multi property and adapt wallet pdf with it

* copy change new wallet screen

* fix util descriptor tests

* make convert_receive_descriptor_to_combined_descriptor work with single sig descriptors

* Update src/cryptoadvance/specter/templates/wallet/new_wallet/new_wallet.jinja

* simplify convert_receive_descriptor_to_combined_descriptor

* fix typos
2023-06-29 17:23:52 +02:00
Manolis Mandrapilias
e217ce7863
Feature: Implement automatic wallet import via Specter URI for MacOS (#2344)
* use prettier to reformat

* poc commit

* adding ids for button clicks

* implementing automatic wallet import

* add import if the app / specterd is already running

* change copy to wallet importer

* redirect to about page if there is no node connection
2023-06-29 16:20:31 +02:00
Manolis Mandrapilias
5928b220de
Chore: Use prettier for Electron app (#2347)
* prettify main.js

* change multisig address verification

* add package-lock to .gitignore
2023-06-28 11:58:40 +02:00
k9ert
82d0fe385c
fix specter.node has no _get_rpc() (#2327)
* fix specter.node has no _get_rpc()

* fixes #2123

* black

---------

Co-authored-by: Kim Neunert <kim@swanbitcoin.com>
2023-05-01 13:47:02 +02:00
k9ert
6202c06abb
release notes v2.0.1 (#2315) 2023-03-27 21:31:17 +02:00
k9ert
e8c5e3f4e6
Bugfix: method getaddressinfo not implemented (#2313)
This PR fixes #2312 which are four things:
* getaddressinfo was not implemented in spectrum which results in "method not found"
* There was an unrelated KeyError which occured in Transactions where one the output was a change-address. It's a bit unknown why that hasn't occured earlier. At least it was diffcult to spot as the fetch_transactions call was way to huge and very confusing. So ...
* the fetch_transactions call was refactored in its own class, TxFetcher. As we did that,  we also moved two other related files in a newly created wallet-package.
* Tiny bug around tx["amount"] which only exists as tx["flow_amount"] for transactions.
2023-03-27 21:22:56 +02:00
Manolis Mandrapilias
a1d751b6f0
Swan plugin: New design, improved UX and bug fixes (#2309)
* fix/improve styling of swan icon in address detail view and overview
* style and change specter remote copy
* first round of commits to style plugin and fix bugs
* reduce SWAN_ALLOWED_SPECTER_HOSTNAMES to only localhost
* style associate address with service
* style dev helper
* explain hide switcher function in tx table documentation
* better feedback in settings if no auto-withdrawal plan was saved yet
* add info about swan email if not wallet withdrawal plan yet
* set swan plugin devstatus to prod again
* handle api error when removing swan integration
2023-03-21 10:22:33 +01:00
Manolis Mandrapilias
f3bb281ac4
Bugfix/UIUX: Fix Tor configuration issues and improve UX of built-in Tor (#2304)
* fix: tor control port input was not saved
* fix built-in tor issues and improve ux
* change copy in tor settings
* display btc price without decimals + simplify the filter
* fix wrong default value in config manager
2023-03-20 19:00:23 +01:00
k9ert
e9d6dd89d5
Bugfix: Keyerror in case of frozen utxos (#2308)
* Bugfix: Keyerror in case of frozen utxos

* fixes #2253

* clarifications and remove utxo_amount

* upgrade spectrum
2023-03-17 16:45:44 +01:00
Manolis Mandrapilias
aa5aaeb6db
Chore: comments for macos build script (#2228)
Co-authored-by: k9ert <k9ert@gmx.de>
2023-03-15 13:29:46 +01:00
Manolis Mandrapilias
5e988626fd
Bugfix: replace deprecated new-window with setWindowOpenHandler (#2293)
Co-authored-by: k9ert <k9ert@gmx.de>
2023-03-15 12:16:15 +01:00
k9ert
6a4829e22c
Docs: update faq (#2287)
* some faq refurbishing

* docs: update TOC

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

* Update docs/faq.md

Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>

---------

Co-authored-by: k9ert <k9ert@users.noreply.github.com>
Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>
2023-03-13 10:10:06 +01:00
k9ert
fb089793f0
Chore: Updating dependencies (#2298) 2023-03-09 15:32:02 +01:00
k9ert
66326dece0
Chore: Random improvements (#2292)
* remove lots of  wallet_manager logging

* make tiny perf-logging a bit more usefull

* bump spectrum

* limit logging in Spectrum

* deactivating swan plugin

* set devstatus to beta

* checker frequency and enabling env-var SPECTER_LOGFORMAT even in dev

* extension-framework refactorings and improvements

* fix tests

* extension discovery bugfixes

* better logging and discovery control

* fix test

* more reasonable speech

* remove that unwanted code
2023-03-09 12:34:44 +01:00
Moritz
6461415633
Docs: Update Screenshots on Readme file (#2286)
* Update Screenshots on Readme file

* docs: update TOC

---------

Co-authored-by: moritzwietersheim <moritzwietersheim@users.noreply.github.com>
Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>
Co-authored-by: k9ert <k9ert@gmx.de>
2023-03-09 09:35:28 +01:00
Manolis Mandrapilias
7119b49366
Feature: Enable Taproot support for Trezor (#2295)
* simpler check for taproot support for bitcoin core connection

* set taproot support to true for trezor
2023-03-09 09:22:59 +01:00
Manolis Mandrapilias
b004ca2e30
UIUX: Consistent use of "Settings" in Electron app and specterd args parsing (#2288)
* consistent usage of "settings" in menus

* simpler specterd cli args code

* Change cli args label to illustrate need of "=" sign

* Change headline in settings.html

---------

Co-authored-by: k9ert <k9ert@gmx.de>
2023-03-07 19:12:50 +01:00
k9ert
45c3a32041
Bugfix: logging improvements, spectrum socket fix and swan plugin deactivation (#2284)
* remove lots of  wallet_manager logging

* make tiny perf-logging a bit more usefull

* bump spectrum

* limit logging in Spectrum

* deactivating swan plugin

* set devstatus to beta
2023-03-07 18:56:39 +01:00
Manolis Mandrapilias
f2e3a30f89
Bugfix: improvements based on developer testing feedback (#2283)
* backButton fix

* open docs link on about page in extra window

* add connecting indicator when clicking on "connect"

* stop camera when closing import wallet overlay
2023-03-07 11:29:26 +01:00
OTK
0c09872e27
Merge pull request #2276 from moneymanolis/favicon-for-light-and-dark-mode
UIUX: Light and dark mode favicons for browser
2023-03-03 12:49:43 -05:00
OTK
09d3c875b5
Merge branch 'master' into favicon-for-light-and-dark-mode 2023-03-03 11:01:30 -05:00
k9ert
0ad4f219cd
Chore: pin babel to 2.11.0, fixes #2280 (#2281) 2023-03-03 14:16:02 +01:00
Manolis Mandrapilias
205669dc32
Merge branch 'master' into favicon-for-light-and-dark-mode 2023-03-03 13:25:06 +01:00
k9ert
7b259e5839
Feature: Enabling Tor for Spectrum connection and socket improvements (#2274)
* using tor for the spectrum connection

* bumped spectrum to 0.6.0 for tor support

* bump spectrum for smaller fixes

* change copy in Tor settings

---------

Co-authored-by: moneymanolis <moneymanolis@protonmail.com>
2023-03-02 20:30:18 +01:00
Manolis Mandrapilias
801e3aa4a8
Merge branch 'master' into favicon-for-light-and-dark-mode 2023-03-02 20:22:59 +01:00
k9ert
2f21a03c26
Feature: More robust wallet recreation and support tool "Wallet management" for Spectrum (#2273)
* having a very limites spectrum wallet-backend-admin tool

* remove renumbering of wallets

* enriched alias function

* add wallets_aliases property to wallet manager

* use alias when checking names at wallets endpoint

* get rid of scary "ERROR" in base.jinja

* change title for input field for creating a new wallet

* strip leading and trailing whitespaces in alias()

* pytest added

* fix pytests

* Moving Wallet Link to settings

* a bit of styling

---------

Co-authored-by: moneymanolis <moneymanolis@protonmail.com>
Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>
2023-03-02 19:59:33 +01:00