Skip to content
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

Merged
merged 4 commits into from
Dec 14, 2017

Conversation

mykola-mokhnach
Copy link
Contributor

It is ok for clients to have access to extended possibilities if Appium server is running on their side.


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`);
Copy link
Contributor

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?

Copy link
Contributor Author

@mykola-mokhnach mykola-mokhnach Dec 14, 2017

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

Copy link
Contributor

@dpgraham dpgraham left a 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/);
});
});
Copy link
Contributor

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?

Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants