-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow execution of mobile:shell if relaxed security is enabled for the driver #293
Conversation
|
||
commands.mobileShell = async function (opts = {}) { | ||
if (!this.relaxedSecurityEnabled) { | ||
log.errorAndThrow(`Appium server must have relaxed security flag set in order to run any shell commands`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this mention the actual name of the flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name is anyway mentioned in the documentation. Plus less work for us if we decide to change argument's name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
await driver.execute('mobile: shell', {command: 'pm', args: ['list']}) | ||
.should.eventually.be.rejectedWith(/must have relaxed security flag set/); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we able to add a test that successfully executes a shell command?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you read my mind :-P
It is ok for clients to have access to extended possibilities if Appium server is running on their side.