Skip to content

Fix undefined references in various places - #235

Open
zapu wants to merge 5 commits into
keybase:masterfrom
zapu:fix-p3skb-bad-encrypt-error
Open

Fix undefined references in various places#235
zapu wants to merge 5 commits into
keybase:masterfrom
zapu:fix-p3skb-bad-encrypt-error

Conversation

@zapu

@zapu zapu commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

There is a few missing imports and other typos that would cause ReferenceError. This is especially dangerous in async context in iced code, where in a Node.js environment it would crash the process with an "uncaught exception" error. The P3SKB decryption error here is an example of such issue, where calling (async) KeyManager.import_from_p3skb with a corrupted bundle throws ReferenceError.

Comment thread src/basekeypair.iced

add_priv : (priv_raw) ->
[err, @priv, len] = Priv.alloc priv_raw
[err, len]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused, I couldn't figure out how that was supposed to work. Priv.alloc does not return array of 3 elements anywhere.

fn = (buf) -> obj.finalize(WordArray.from_buffer(buf)).to_buffer()
fn.algname = buf.algname

#====================================================================

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant