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

Add PHP as a vulnerable language #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Seldaek
Copy link

@Seldaek Seldaek commented Nov 24, 2021

Based off the JS tests as the languages are very similar. This has also been reported as a security issue to the PHP project (security reports are private so I can't link to it).

Copy link

@sc0Vu sc0Vu left a comment

Choose a reason for hiding this comment

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

@Seldaek is php also vulnerable to early return?

Here is my test script, how do you think?

#!/usr/bin/env php
<?php
$balance= 100;
function substractBalance($amount) {
	/* Subtract funds from bank account then⁧ /*/ return ;
	$balance -= $amount;
}

echo "Starting Balance: " . $balance . PHP_EOL;
substractBalance(50);
echo "After Subtracting 50: " . $balance . PHP_EOL;

@Seldaek
Copy link
Author

Seldaek commented Mar 27, 2024

I guessI'd mark it as ~ per the README, because */ would be more idiomatic. But anyway I don't think this repo is very much maintained so I'll not spend time updating the PR :)

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.

2 participants