Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gaoding/co-wechat

Package Overview
Dependencies
Maintainers
15
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gaoding/co-wechat - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

28

lib/wechat.js

@@ -272,20 +272,18 @@ 'use strict';

ctx.body = '';
return;
}
} else {
var replyMessageXml = reply(body, formatted.ToUserName, formatted.FromUserName);
var replyMessageXml = reply(body, formatted.ToUserName, formatted.FromUserName);
if (!query.encrypt_type || query.encrypt_type === 'raw') {
ctx.body = replyMessageXml;
} else {
var wrap = {};
wrap.encrypt = CRYPTOR.encrypt(replyMessageXml);
wrap.nonce = parseInt((Math.random() * 100000000000), 10);
wrap.timestamp = new Date().getTime();
wrap.signature = CRYPTOR.getSignature(wrap.timestamp, wrap.nonce, wrap.encrypt);
ctx.body = encryptWrap(wrap);
if (!query.encrypt_type || query.encrypt_type === 'raw') {
ctx.body = replyMessageXml;
} else {
var wrap = {};
wrap.encrypt = CRYPTOR.encrypt(replyMessageXml);
wrap.nonce = parseInt((Math.random() * 100000000000), 10);
wrap.timestamp = new Date().getTime();
wrap.signature = CRYPTOR.getSignature(wrap.timestamp, wrap.nonce, wrap.encrypt);
ctx.body = encryptWrap(wrap);
}
ctx.type = 'application/xml';
}
ctx.type = 'application/xml';
if(next) {

@@ -292,0 +290,0 @@ return await next();

{
"name": "@gaoding/co-wechat",
"version": "2.3.0",
"version": "2.3.1",
"description": "wechat api for co",

@@ -5,0 +5,0 @@ "main": "lib/wechat.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc