Skip to content

Add PHP as a vulnerable language#18

Open
Seldaek wants to merge 1 commit into
nickboucher:mainfrom
Seldaek:add_php
Open

Add PHP as a vulnerable language#18
Seldaek wants to merge 1 commit into
nickboucher:mainfrom
Seldaek:add_php

Conversation

@Seldaek

@Seldaek Seldaek commented Nov 24, 2021

Copy link
Copy Markdown

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).

@sc0Vu sc0Vu left a comment

Copy link
Copy Markdown

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

Seldaek commented Mar 27, 2024

Copy link
Copy Markdown
Author

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