Skip to content

Commit

Permalink
added colon at end of if statement - bip-0119.mediawiki
Browse files Browse the repository at this point in the history
Python requires a colon at the end of an if statement to denote the beginning of the block of code that will be executed if the condition is True. If the colon is omitted, a syntax error will occur, and the code will not run. Since the syntax error will prevent the code from running, it won't introduce any vulnerabilities by itself. However, it will cause the application to fail at the point where the code is parsed, which might expose other issues if error handling is not implemented properly.
  • Loading branch information
git-sgmoore authored Aug 15, 2023
1 parent 55566a7 commit 2f1e2bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bip-0119.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def execute_bip_119(self):
self.context.precomputed_ctv_data = self.context.tx.get_default_check_template_precomputed_data()
# If the hashes do not match, return error
if stack[-1] != self.context.tx.get_default_check_template_hash(self.context.nIn, self.context.precomputed_ctv_data)
if stack[-1] != self.context.tx.get_default_check_template_hash(self.context.nIn, self.context.precomputed_ctv_data):
return self.errors_with(errors.script_err_template_mismatch)
return self.return_as_nop()
Expand Down

0 comments on commit 2f1e2bc

Please sign in to comment.