Compare View

switch
from
...
to
 
Commits (2)

Changes

Showing 3 changed files Side-by-side Diff

center/messaging/trx-center.js
... ... @@ -104,17 +104,20 @@ function generateRequestId(req) {
104 104  
105 105 function executePrepaidBuy(paramsFromTransport, cb) {
106 106 const tokens = paramsFromTransport.msg.trim().split(/[\., ]+/);
  107 +
  108 + /*
107 109 if (!tokens || tokens.length < 3) {
108 110 cb && cb(null, {msg: 'Invalid command'});
109 111 return;
110 112 }
  113 + */
111 114  
112 115 const qs = {
113 116 request_id: tokens[3],
114 117 terminal_name: paramsFromTransport.partner.toLowerCase(),
115   - product_name: tokens[0].toUpperCase(),
116   - destination: tokens[1].toUpperCase(),
117   - password: tokens[2],
  118 + product_name: typeof tokens[0] === 'string' ? tokens[0].toUpperCase() : null,
  119 + destination: typeof tokens[1] === 'string' ? tokens[1].toUpperCase() : null,
  120 + password: typeof tokens[2] === 'string' ? tokens[2] : null,
118 121 origin: config.origin || config.username,
119 122 report_port: config.listen_port || '80',
120 123 msg: paramsFromTransport.msg,
1 1 {
2 2 "name": "komodo-sdk",
3   - "version": "1.36.7",
  3 + "version": "1.36.8",
4 4 "lockfileVersion": 1,
5 5 "requires": true,
6 6 "dependencies": {
1 1 {
2 2 "name": "komodo-sdk",
3   - "version": "1.36.7",
  3 + "version": "1.36.8",
4 4 "description": "SDK for Komodo",
5 5 "main": "index.js",
6 6 "scripts": {