Socket
Socket
Sign inDemoInstall

qcobjects-cli

Package Overview
Dependencies
Maintainers
1
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qcobjects-cli - npm Package Compare versions

Comparing version 0.1.36 to 0.1.37

59

backend/org.quickcorp.backend.php.js

@@ -80,2 +80,11 @@ /**

},
trimSlash:function (pathname){
if (pathname.startsWith('/')){
pathname = pathname.slice(1);
}
if (pathname.endsWith('/')){
pathname = pathname.slice(0,-1);
}
return pathname.replace('//','/');
},
get:function (){

@@ -92,4 +101,24 @@ var microservice = this;

&& microservice.route.redirect_to !== '')?(microservice.route.redirect_to):(microservice.request.scriptname);
var pathname = this.trimSlash(microservice.request.pathname);
var documentRoot = CONFIG.get('documentRoot','');
if (documentRoot == './'){
documentRoot = '';
}
var commandline = microservice.get_php_headers_list()+` php -q <<- 'EOF'
var scriptFilePath;
if (documentRoot !== ''){
scriptFilePath = `${documentRoot}/${pathname}/${scriptFileName}`;
} else {
scriptFilePath = `${pathname}/${scriptFileName}`;
}
scriptFilePath = scriptFilePath.replace('//','/');
if (scriptFilePath.startsWith('/') && !documentRoot.startsWith('/')){
scriptFilePath = scriptFilePath.slice(1);
}
logger.debug(`Loading PHP file: ${scriptFilePath}`);
var PHPIncludePath = `.:${CONFIG.get('documentRoot')}:${CONFIG.get('projectPath')}`;
var commandline = microservice.get_php_headers_list()+` php -d include_path="${PHPIncludePath}" -q <<- 'EOF'
<?php

@@ -105,7 +134,7 @@ $_payload = file_get_contents(sys_get_temp_dir().'${microservice.tempFileName}');

unlink(sys_get_temp_dir().'${microservice.tempFileName}');
@include_once('${scriptFileName}');
include('${scriptFilePath}');
?>
EOF`
commandline = fixWinCmd(commandline);
// logger.debug(commandline);
logger.debug(commandline);
try {

@@ -136,4 +165,24 @@ microservice.body = execSync(commandline).toString();

&& microservice.route.redirect_to !== '')?(microservice.route.redirect_to):(microservice.request.scriptname);
var pathname = this.trimSlash(microservice.request.pathname);
var documentRoot = CONFIG.get('documentRoot','');
if (documentRoot == './'){
documentRoot = '';
}
var commandline = microservice.get_php_headers_list()+` php -q <<- 'EOF'
var scriptFilePath;
if (documentRoot !== ''){
scriptFilePath = `${documentRoot}/${pathname}/${scriptFileName}`;
} else {
scriptFilePath = `${pathname}/${scriptFileName}`;
}
scriptFilePath = scriptFilePath.replace('//','/');
if (scriptFilePath.startsWith('/') && !documentRoot.startsWith('/')){
scriptFilePath = scriptFilePath.slice(1);
}
logger.debug(`Loading PHP file: ${scriptFilePath}`);
var PHPIncludePath = `.:${CONFIG.get('documentRoot')}:${CONFIG.get('projectPath')}`;
var commandline = microservice.get_php_headers_list()+` php -d include_path="${PHPIncludePath}" -q <<- 'EOF'
<?php

@@ -149,3 +198,3 @@ $_payload = file_get_contents(sys_get_temp_dir().'${microservice.tempFileName}');

unlink(sys_get_temp_dir().'${microservice.tempFileName}');
@include_once('${scriptFileName}');
@include('${scriptFilePath}');
?>

@@ -152,0 +201,0 @@ EOF`

2

package.json
{
"name": "qcobjects-cli",
"version": "0.1.36",
"version": "0.1.37",
"description": "qcobjects cli command line tool",

@@ -5,0 +5,0 @@ "main": "qcobjects-cli.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