Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix a little bug of logic #41

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

Merged
tcstool merged 5 commits into codingo:0.5 from youngyangyang04:0.5.1.1
Jun 4, 2016
Merged

fix a little bug of logic #41

tcstool merged 5 commits into codingo:0.5 from youngyangyang04:0.5.1.1
Jun 4, 2016

Conversation

Copy link
Contributor

@youngyangyang04 youngyangyang04 commented May 21, 2016
edited
Loading

operator ''>'' should be replace with ''>=' in 157 line number in nsmmongo.py
Describtion when user select a database to steal, there is a bug if user enter database number equal to the account of database plus one
leak test:
1-local
2-VASTTEST
3-admin
Select a database to steal: 56
Invalid selection.
Select a database to steal: 23
Invalid selection.
Select a database to steal: 4
Does this database require credentials (y/n)?

4 is a invalid number, but system accept it

Describtion when user select a database to steal, there is a bug if user enter database number equal to the account of database plus one
leak test:
1-local
2-VASTTEST
3-admin
Select a database to steal: 56
Invalid selection.
Select a database to steal: 23
Invalid selection.
Select a database to steal: 4
Does this database require credentials (y/n)?
4 is a invalid number, but system accept it
...)" out of the "if" statements, because if don't do this, the code in line number 174 will be not executed if user select the option that require credentials.
lead test:
Exception e is "local variable 'myDBConn' referenced before assignment". It indicates the code in line number 174 will be not executed if user select the option that require credentials.
After modification
Exception e is "command SON([('copydb', 1), ('username', 'youngyangyang04'), ('nonce', u'b9d5887c5f7cc17c'), ('fromdb', u'admin'), ('todb', u'admin_stolen'), ('key', u'dcfd7214988466b2f620809fd27015b4'), ('fromhost', '128.95.1.27')]) failed: unable to login { code: 18, ok: 0.0, errmsg: "auth fails" }"
So the code in line number 174 works
@tcstool tcstool merged commit 0ff71dc into codingo:0.5 Jun 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /