Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
node-firebird
Advanced tools
Pure javascript and asynchronous Firebird client for Node.js
npm install node-firebird
fb = require("node-firebird");
fb.attach('127.0.0.1', 3050, db, 'SYSDBA', 'masterkey',
function(db){
database = db;
console.log("connected");
},
function(error){
console.log("can't connect");
}
);
database.execute("select cast(? as integer) from rdb$database", [123],
function (result) {
console.log(result.data)
}
);
The transaction automatically started and commited/rollbacked.
var tr;
function fail(err) {
tr.rollback();
console.log(err.status);
}
database.startTransaction(function(transaction) {
tr = transaction;
tr.execute("select cast(? as integer) from rdb$database", 123, function(result1) {
tr.execute("select cast(? as integer) from rdb$database", 456, function(result2) {
tr.commit(function(ret) {
console.log(result1.data[0]);
console.log(result2.data[0]);
}, fail)
}, fail);
}, fail);
})
Most async methods can trigger a callback and an error event, they are optionnals. If an error occur the error event will be called, if no error event is provided, the error will be sent to the callback event and you will have to check if the result is an error. An error object have a status property.
function CheckResult(obj) {
if (obj.status) {
throw new Error('oups')
}
}
database.startTransaction(function(transaction) {
transaction.execute("select cast(? as integer) from rdb$database", 123, function(result) {
transaction.commit(function(ret) { // commit in all situations for a single query
CheckResult(result); // error executing query ?
CheckResult(ret); // error commiting ?
console.log(result.data);
})
});
})
FAQs
Pure JavaScript and Asynchronous Firebird client for Node.js.
The npm package node-firebird receives a total of 5,367 weekly downloads. As such, node-firebird popularity was classified as popular.
We found that node-firebird demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.