Add relaxed security command line flag
MODIFY
lib/appium.js
lib/appium.js
@@ -28,7 +28,11 @@ class AppiumDriver extends BaseDriver {
// the main Appium Driver has no new command timeout
this.newCommandTimeoutMs = 0;
- this.args = args;
+ this.args = Object.assign({}, args);
+ if (this.args.relaxedSecurityEnabled) {
+ this.relaxedSecurityEnabled = true;
+ delete this.args.relaxedSecurityEnabled;
+ }
// Access to sessions list must be guarded with a Semaphore, because
// it might be changed by other async calls at any time
@@ -189,6 +193,9 @@ class AppiumDriver extends BaseDriver {
let runningDriversData, otherPendingDriversData;
let d = new InnerDriver(this.args);
+ if (this.relaxedSecurityEnabled) {
+ d.relaxedSecurityEnabled = true;
+ }
try {
runningDriversData = await this.curSessionDataForDriver(InnerDriver);
} catch (e) {

MODIFY
lib/parser.js
lib/parser.js
@@ -738,6 +738,18 @@ const deprecatedArgs = [
required: false,
help: 'Enable collection of NodeJS memory heap dumps. This is useful for memory leaks lookup',
nargs: 0
+ }],
+
+ [['--relaxed-security'], {
+ defaultValue: false,
+ dest: 'relaxedSecurityEnabled',
+ action: 'storeTrue',
+ required: false,
+ help: 'Disable additional security checks, so it is possible to use some advanced features, provided ' +
+ 'by drivers supporting this option. Only enable it if all the ' +
+ 'clients are in the trusted network and it\'s not the case if a client could potentially ' +
+ 'break out of the session sandbox.',
+ nargs: 0
}]
];

Add relaxed security command line flag