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

Remove AcidTest and bunch others #871

Merged

Conversation

tomasbrod
Copy link
Member

This fixes DoS attack reported by @barton2526 and performed by tcblack.
Also code 🔪

src/net.cpp Outdated
std::string bhrn = boincHashRandNonce.GetHex();
std::string grid_pass_encrypted = AdvancedCryptWithSalt(bhrn+nonce+org+pub_key_prefix,sboinchashargs);
std::string sComm = nonce+","+command+","+pw1+","+org+","+pub_key_prefix+","+bhrn+","+grid_pass_encrypted;
std::string sComm = "deprecated,d,d,d,d,d,d";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must have 7 items to avoid ban.

src/net.cpp Outdated
std::string acid = GetCommandNonce("aries");
std::string sGRCAddress = DefaultWalletAddress();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid leaking unnecessary info.

results.push_back(entry);

}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was throwing errors so i deleted

src/main.cpp Outdated
pfrom->Misbehaving(1);
return false;
}
/* it did nothing anyway */
return true;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check was crashing so skip that and just return true.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the entire function and the checks that depend on it.

Copy link
Member

@denravonska denravonska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if we could remove the dead functions so we don't have to be bothered by them anymore.

src/main.cpp Outdated
pfrom->Misbehaving(1);
return false;
}
/* it did nothing anyway */
return true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the entire function and the checks that depend on it.

src/net.cpp Outdated
std::string nonce = boincHashRandNonce.GetHex();
std::string pw1 = RetrieveMd5(nonce+","+sboinchashargs);
std::string mycpid = GlobalCPUMiningCPID.cpidv2;
std::string sboinchashargs = "";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strings are initialized to empty in their default constructor so = "" is not needed.

@tomasbrod
Copy link
Member Author

@denravonska I made the suggested changes.
Before release, functionality of neural network must be verified.
More I noticed that one of my clients somehow connected two times to same node. There were two same addresses in getpeerinfo.

@iFoggz
Copy link
Member

iFoggz commented Jan 26, 2018

for out going connections u can only connect to one node ip in a certain size class range if i remember correctly. however if they have a ipv6 address as well u can then in turn have 2 connections to it (thou im not seeing this really commonly). incoming connections i believe don't have this rule. we should look into this more as well

@tomasbrod tomasbrod mentioned this pull request Feb 9, 2018
@tomasbrod tomasbrod changed the title Fix buffer overflow in AcidTest Remove AcidTest and bunch others Feb 20, 2018
@denravonska denravonska merged commit 6fb2c7e into gridcoin-community:development Mar 4, 2018
denravonska added a commit that referenced this pull request May 25, 2018
Fixed
 - Fixes for displaying on high DPI displays, #517 (@skcin).
 - Re-enable unit tests, add unit test to Travis, #769, #808 (@TheCharlatan).
 - Fix empty string in sendalert2 (@tomasbrod).

Added
 - Neural Report RPC command, #1063 (@tomasbrod).
 - GUI wallet redign with new icons and purple native style (@skcin).

Changed
 - Switch to autotools and Depends from Bitcoin, #487 (@TheCharlatan).
 - Clean and update docs for new build system, remove outdated, #828 (@TheCharlatan).
 - Change estimated time to stake calculations to be more accurate, #1084 (@jamescowens).
 - Move logging to tinyformat, #1009 (@TheCharlatan).
 - Improve appcache performance, #734 (@denravonska).
 - Improve block index memory access performance, #679 (@denravonska).
 - NN fixes: clean logging, explain mag single response, move contract to ndata_nresp (@denravonska)
 - Updated translations:
    - Turkish, #771 (@confuest).
    - Chinese, #1012 (@linnaea).
 - RPC refactor: Cleaner locks, better error handling, move execute calls to straght rpc calls, #1024 (@Foggyx420).
 - Change locking primitives from Boost to STL, #1029 (@Foggyx420).

Removed
 - gridcoindiagnostic RPC call (@denravonska).
 - Galaza, #945 (@barton2526).
 - Assertion in SignSignature, #998 (@TheCharlatan).
 - Upgrade menu, #1094 (@jamescowens).
 - Acid test functions, #871 (@tomasbrod).
 - Qt4 support, #801 (@denravonska).
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