Commit graph

2093 commits

Author SHA1 Message Date
roshii
50b5d6330e
The alias function is used to create a unique_id out of a user input, e.g. for device and most importantly for wallet names. The naming of this function now reflect this. (#2439)
Signed-off-by: Simon Castano <roshii@riseup.net>
Co-authored-by: k9ert <k9ert@gmx.de>
2024-05-29 14:58:20 +02:00
k9ert
92f10e01b0
Macos intel build (#2446)
* remove conflicting dependencies

* intel preparation (untested)

* make orgName more flexible to test

* adjust set-version logic

* build-osx package target

* fix syntax

* fix syntax

* fix syntax

* append arch for upload

* syntax

* syntax

* fixes

* fix

* complete feature

* fix

* set-version now deleting the file instead of complaining if version-mismatch

* further improvements

* parametrize CI_PROJECT_ROOT_NAMESPACE with --gh-project

* more fixes

* tinyfix

* small fix

* fix packaging

* fix

* fix

* documentation and further polishing

* polishing

* bugfixes and feedback

* docs

* more polishing

* testrun

* kick

* kick

* kick again

* kick yet again

* kick

* kick again

* kick

* kick yet again

* fix

* kick

* kick again and again

* kick again

* kick

* kick again

* kick yet again

* remove comments for restriction
2024-05-29 11:45:52 +02:00
k9ert
7fd2b9158d
release_notes 2.0.4 (#2445) 2024-05-23 12:14:56 +02:00
k9ert
9a15a01f47
Electron App Dependencies (#2444)
* migrate the downloadpage generation script to this repo

* tiny docs fix

* fix 2 electron issues

* support intel platform

* fix save preferences bug

* electron upgrade

* upgrading electron dependencies
2024-05-22 21:43:13 +02:00
k9ert
5f05b9aa3b
Electron Bug Fixes and Miscellaneous Changes (#2441)
* migrate the downloadpage generation script to this repo

* tiny docs fix

* fix 2 electron issues

* support intel platform

* fix save preferences bug
2024-05-22 17:40:21 +02:00
k9ert
d58232c582
Build fixes for windows (#2443)
* few updates and build fixes for windows

* adding aioitertools

* avoiding ZoneInfo keys may not be absolute paths, got: /UTC

* fix the UTC issue
2024-05-22 14:54:41 +02:00
k9ert
95c06784f4
adding release_notes for v2.0.3 (#2440) 2024-05-17 10:30:15 +02:00
k9ert
e29bc01fbb
fix bad error-messaging (#2437)
* more consistent error_handling

* upgrade spectrum for better error-handling

* small fix

* upgrade spectrum

* release script improvements for macOS
2024-05-17 09:06:44 +02:00
roshii
0229bb7d62
Fix node2 RPC port & add missing elm mark (#2438)
- Set second test bitcoin node RPC port to 18545 (i/o 18544) to avoid P2P port conflict with first node
- Add missing "elm" mark to test_node_controller.py::test_node_running_elements

Signed-off-by: Simon Castano <roshii@riseup.net>
Co-authored-by: k9ert <k9ert@gmx.de>
2024-05-16 22:23:51 +02:00
Wim van der Ham
0ba9de2de9
Add support for more languages for mnemonics (#2424)
* Add more languages for mnemonics

* Remove check for english if french

* remove dev artifact

---------

Co-authored-by: Wim van der Ham <wfjvdham@gmail.com>
Co-authored-by: Kim Neunert <kim@swanbitcoin.com>
Co-authored-by: k9ert <k9ert@gmx.de>
2024-05-16 18:35:08 +02:00
Wim van der Ham
a52fec89d8
Fix install_noded.sh (#2422)
* Fix install_noded.sh

* reestablish finally

---------

Co-authored-by: Wim van der Ham <wfjvdham@gmail.com>
Co-authored-by: k9ert <k9ert@gmx.de>
Co-authored-by: Kim Neunert <kim@swanbitcoin.com>
2024-05-16 17:58:38 +02:00
KYC
714a8ae771
Update README.md (#2435)
Adding some clarity and consistency in how to provide user authentication details.

Both admin:password and admin:secret are used in curl examples, neither of which actually authenticate. 

Swapping them for user:password shows what the key-pair is meant to represent and then adding a note at the top to say what the default user and password key-value pair is allows for easy authentication.
2024-05-14 15:51:10 +02:00
Leon Costa
9890d1e9bc
Allow bumpfee on transactions with a single output (#2433)
Co-authored-by: k9ert <k9ert@gmx.de>
2024-05-06 17:40:18 +02:00
k9ert
c56eff5816
updating dependencies (#2434) 2024-05-02 17:13:53 +02:00
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