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

Track taints in static properties #8150

Merged
merged 3 commits into from Jun 24, 2022

Conversation

muglug
Copy link
Collaborator

@muglug muglug commented Jun 23, 2022

I noticed that taints through static properties are not recognised — the following code does not currently trigger a security analysis issue:

<?php
class A {
    private static string $last = "";

    public static function getLast(string $s): string {
        $last = self::$last;
        self::$last = $s;
        return $last;
    }
}

A::getLast($_GET["a"]);
echo A::getLast("foo");

@muglug muglug added PR: Need review release:fix The PR will be included in 'Fixes' section of the release notes and removed PR: Need review labels Jun 23, 2022
@orklah
Copy link
Collaborator

orklah commented Jun 24, 2022

Thanks!

@orklah orklah merged commit f2f211c into vimeo:master Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug release:fix The PR will be included in 'Fixes' section of the release notes taint analysis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants