SatoshiQaziMuhammed d4c8c5f26e fix(ui): leave no angle bracket in a sanitized origin; judge markup on the raw one (#16)
* fix(ui): leave no angle bracket in a sanitized origin; judge markup on the raw one

sanitizeOrigin removed tags in a single pass, so `<scr<script>ipt>`
came out as `<script` (CodeQL js/incomplete-multi-character-sanitization
#6, #7). The page renders the result as React text, so this was not
exploitable here, but the helper's name promised more than it did. It
now also drops every remaining `<` and `>`.

validateOrigin looked for markup in the sanitized string, after the tags
had been removed, so `<b>x</b>` passed as a valid origin. It now checks
the raw origin first.

pr-any.yml gets permissions: contents: read and lock.yml the
issues/pull-requests/discussions write it needs (CodeQL
actions/missing-workflow-permissions #3, #23).

* test(ui): typed cases and the matchers the test shim implements

The first version used it.each (untyped rows, @typescript-eslint/no-unsafe-argument) and expect().not.toMatch, which @pezkuwi/dev-test does not implement. Plain loops over string[] and a boolean assertion instead. With the repo runner: 5/5 pass on the fix, 3 of 5 fail on main's sanitizeOrigin.ts.
2026-10-20 23:00:57 +04:00
2026-10-12 09:27:10 +04:00

Pezkuwi Extension

A browser extension for PezkuwiChain that injects a @pezkuwi/api Signer into a page, along with any associated accounts, allowing for use by any dapp. This is an implementation of a PezkuwiChain browser signer.

Developed by Dijital Kurdistan Tech Institute

Overview

This extension manages accounts and allows the signing of transactions with those accounts for the PezkuwiChain network.

Installation

Documentation

Find out more about how to use the extension as a Dapp developer in the Pezkuwi Extension Documentation

Development

Prerequisites

  • Node.js >= 18.14
  • Yarn 4.x (via corepack)

Building from Source

  1. Enable corepack: corepack enable
  2. Install dependencies: yarn install
  3. Build for Chrome: yarn build:chrome
  4. Build for Firefox: yarn build:ff

Loading the Extension

Chrome:

  1. Go to chrome://extensions/
  2. Enable "Developer mode"
  3. Click "Load unpacked" and select packages/extension/build

Firefox:

  1. Go to about:debugging#addons
  2. Check "Enable add-on debugging"
  3. Click "Load Temporary Add-on" and select packages/extension/build/manifest.json

Packages

For Dapp Developers

Use the @pezkuwi/extension-dapp package to integrate with this extension or any compatible extension.

import { web3Enable, web3Accounts } from '@pezkuwi/extension-dapp';

// Enable the extension
const extensions = await web3Enable('My Dapp');

// Get all accounts
const accounts = await web3Accounts();

License

Apache-2.0

Author

Dijital Kurdistan Tech Institute

S
Description
No description provided
Readme Apache-2.0
22 MiB
1 Watchers 0 Forks
Languages
TypeScript 96.3%
JavaScript 1.7%
Python 0.6%
CSS 0.6%
Shell 0.4%
Other 0.4%