fix: ignore non-issues without current solution

This commit is contained in:
Yarmo Mackenbach 2023-05-03 15:35:40 +02:00
parent fceb5b6f9b
commit 4f5e5592f4
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1
8 changed files with 13 additions and 0 deletions

View file

@ -70,6 +70,7 @@ module.exports.fn = async (data, opts) => {
host, host,
date: now.toUTCString(), date: now.toUTCString(),
accept: 'application/activity+json', accept: 'application/activity+json',
// @ts-ignore
'User-Agent': `doipjs/${require('../../package.json').version}` 'User-Agent': `doipjs/${require('../../package.json').version}`
} }

View file

@ -60,6 +60,7 @@ module.exports.fn = async (data, opts) => {
axios.post(data.url, jsonData, { axios.post(data.url, jsonData, {
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
// @ts-ignore
'User-Agent': `doipjs/${require('../../package.json').version}` 'User-Agent': `doipjs/${require('../../package.json').version}`
}, },
validateStatus: function (status) { validateStatus: function (status) {

View file

@ -56,6 +56,7 @@ module.exports.fn = async (data, opts) => {
axios.get(data.url, { axios.get(data.url, {
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',
// @ts-ignore
'User-Agent': `doipjs/${require('../../package.json').version}` 'User-Agent': `doipjs/${require('../../package.json').version}`
}, },
validateStatus: function (status) { validateStatus: function (status) {

View file

@ -71,9 +71,11 @@ if (jsEnv.isNode) {
const reEnd = /End\sof\s.*\staxonomy./ const reEnd = /End\sof\s.*\staxonomy./
const keys = [] const keys = []
// @ts-ignore
client.addListener('registered', (message) => { client.addListener('registered', (message) => {
client.send(`PRIVMSG NickServ TAXONOMY ${data.nick}`) client.send(`PRIVMSG NickServ TAXONOMY ${data.nick}`)
}) })
// @ts-ignore
client.addListener('notice', (nick, to, text, message) => { client.addListener('notice', (nick, to, text, message) => {
if (reKey.test(text)) { if (reKey.test(text)) {
const match = text.match(reKey) const match = text.match(reKey)

View file

@ -63,6 +63,7 @@ module.exports.fn = async (data, opts) => {
{ {
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',
// @ts-ignore
'User-Agent': `doipjs/${require('../../package.json').version}` 'User-Agent': `doipjs/${require('../../package.json').version}`
} }
}) })

View file

@ -66,6 +66,7 @@ module.exports.fn = async (data, opts) => {
axios.get(url, { axios.get(url, {
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',
// @ts-ignore
'User-Agent': `doipjs/${require('../../package.json').version}` 'User-Agent': `doipjs/${require('../../package.json').version}`
}, },
validateStatus: (status) => status === 200 validateStatus: (status) => status === 200

View file

@ -40,6 +40,7 @@ const fetchHKP = async (identifier, keyserverDomain) => {
? `https://${keyserverDomain}` ? `https://${keyserverDomain}`
: 'https://keys.openpgp.org' : 'https://keys.openpgp.org'
// @ts-ignore
const hkp = new HKP(keyserverBaseUrl) const hkp = new HKP(keyserverBaseUrl)
const lookupOpts = { const lookupOpts = {
query: identifier query: identifier
@ -72,6 +73,7 @@ const fetchHKP = async (identifier, keyserverDomain) => {
* const key = doip.keys.fetchWKD('alice@domain.tld'); * const key = doip.keys.fetchWKD('alice@domain.tld');
*/ */
const fetchWKD = async (identifier) => { const fetchWKD = async (identifier) => {
// @ts-ignore
const wkd = new WKD() const wkd = new WKD()
const lookupOpts = { const lookupOpts = {
email: identifier email: identifier

View file

@ -55,9 +55,12 @@ const process = async (signature) => {
throw new Error(`Signature could not be read (${e.message})`) throw new Error(`Signature could not be read (${e.message})`)
} }
// @ts-ignore
const issuerKeyID = sigData.signature.packets[0].issuerKeyID.toHex() const issuerKeyID = sigData.signature.packets[0].issuerKeyID.toHex()
// @ts-ignore
const signersUserID = sigData.signature.packets[0].signersUserID const signersUserID = sigData.signature.packets[0].signersUserID
const preferredKeyServer = const preferredKeyServer =
// @ts-ignore
sigData.signature.packets[0].preferredKeyServer || sigData.signature.packets[0].preferredKeyServer ||
'https://keys.openpgp.org/' 'https://keys.openpgp.org/'
const text = sigData.getText() const text = sigData.getText()
@ -112,6 +115,7 @@ const process = async (signature) => {
// Verify the signature // Verify the signature
const verificationResult = await openpgp.verify({ const verificationResult = await openpgp.verify({
// @ts-ignore
message: sigData, message: sigData,
verificationKeys: result.key.data verificationKeys: result.key.data
}) })