Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Mykola Mokhnach committed Dec 14, 2017
1 parent dca6708 commit 1e47e1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docs/en/writing-running-appium/server-args.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,5 @@ All flags are optional, but some are required in conjunction with certain others
|`--localizable-strings-dir`|en.lproj|[DEPRECATED] - (IOS-only) the relative path of the dir where Localizable.strings file resides |`--localizable-strings-dir en.lproj`|
|`--show-ios-log`|false|[DEPRECATED] - (IOS-only) if set, the iOS system log will be written to the console||
|`--enable-heapdump`|false|Enables NodeJS memory dumps collection feature. This feature is extremely useful for finding memory leaks. Use the 'kill -SIGUSR2 <PID>' command to create a dump of memory heap for _node_ process with the particular PID (this works for *nix systems only). The dump file will be created in the same folder, where main Appium script was executed and will have *.heapsnapshot extension. These snapshot can be then loaded to Chrome Inspector for further investigation. Read the [Rising Stack article](https://blog.risingstack.com/finding-a-memory-leak-in-node-js/) for more details.||
|`--relaxed-security`|false|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 is not the case if a client could potentially break out of the session sandbox.||
7 changes: 3 additions & 4 deletions lib/appium.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ class AppiumDriver extends BaseDriver {
this.newCommandTimeoutMs = 0;

this.args = Object.assign({}, args);
if (this.args.relaxedSecurityEnabled) {
this.relaxedSecurityEnabled = true;
delete this.args.relaxedSecurityEnabled;
}

this.relaxedSecurityEnabled = 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
Expand Down Expand Up @@ -194,6 +192,7 @@ class AppiumDriver extends BaseDriver {
let runningDriversData, otherPendingDriversData;
let d = new InnerDriver(this.args);
if (this.relaxedSecurityEnabled) {
log.info(`Applying relaxed security to ${InnerDriver.name} as it has been enabled via the command line`);
d.relaxedSecurityEnabled = true;
}
try {
Expand Down

0 comments on commit 1e47e1b

Please sign in to comment.