
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
captcha-manoj
Advanced tools
Simple captcha for Connect/Express.
Via npm:
$ npm install captcha
var express = require('express');
var captcha = require('captcha');
var app = express();
app.configure(function(){
app.use(express.bodyParser());
app.use(express.cookieParser());
app.use(express.cookieSession({ secret: 'keyboard-cat' }));
app.use(captcha({ url: '/captcha.jpg', color:'#0064cd', background: 'rgb(20,30,200)' })); // captcha params
});
app.get('/', function(req, res){
res.type('html');
res.end('<img src="/captcha.jpg"/><form action="/login" method="post"><input type="text" name="digits"/></form>'); // captcha render
});
app.post('/login', function(req, res){
res.type('html');
res.end('CONFIRM: ' + (req.body.digits == req.session.captcha)); // captcha verify
});
app.listen(8080);
console.log('Web server started.');
var params={
"url":"/captcha.jpg",
"color":"#ffffff",// can be omitted, default 'rgb(0,100,100)'
"background":"#000000",// can be omitted, default 'rgb(255,200,150)'
"lineWidth" : 6, // can be omitted, default 8
"fontSize" : 60, // can be omitted, default 80
"codeLength" : 6, // length of code, can be omitted, default 6
"canvasWidth" : 250,// can be omitted, default 250
"canvasHeight" : 150,// can be omitted, default 150
}
app.use(captcha(params)); // captcha params
FAQs
Simple captcha middleware for Connect
The npm package captcha-manoj receives a total of 0 weekly downloads. As such, captcha-manoj popularity was classified as not popular.
We found that captcha-manoj demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.