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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure anyone can repay loan #29

Merged
merged 1 commit into from Jul 25, 2019

Conversation

matthewjablack
Copy link
Contributor

@matthewjablack matthewjablack commented Jul 24, 2019

Description

This PR fixes a bug that could enable anyone to force the Borrower to repay the loan. This PR fixes that problem by ensuring that the individual calling pay is in fact paying back the loan. This ensures that anyone can repay the loan.

Submission Checklist 馃摑

  • Change loans[loan].bor to msg.sender for repaying the loan

@@ -275,7 +275,7 @@ contract Loans is DSMath {
require(now <= loans[loan].loex);
require(add(amt, backs[loan]) <= owed(loan));

require(tokes[loan].transferFrom(loans[loan].bor, address(this), amt));
require(tokes[loan].transferFrom(msg.sender, address(this), amt));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ensure anyone can repay loan

@matthewjablack matthewjablack merged commit 2f72353 into master Jul 25, 2019
@matthewjablack matthewjablack deleted the 6.13-enable-anyone-to-repay-loan branch July 25, 2019 20:37
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.

None yet

1 participant