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

Added index.html files to common paypalvar folders for donator info protection #36

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

Conversation

mleo1
Copy link

@mleo1 mleo1 commented Jan 12, 2016

Added index.html files to common paypalvar folders for donator info protection

Signed-off-by: mleo1 [email protected]

@mleo1 mleo1 changed the title Added index.html files to common paypalvar folders for donator info p… Added index.html files to common paypalvar folders for donator info protection Jan 27, 2016
@ghost
Copy link

ghost commented May 5, 2016

accept this 😁 @MishimaHaruna

@MishimaHaruna
Copy link
Member

Is this even correct? I'm not a paypal user, but by looking at the paypal documentation it doesn't seem like this covers all the possible cases (why does the fluxcp paypal module use an input from third parties as path, without validation anyways? That's really nasty, I would never ever use that module on a real server). See txn_type and payment_status in the documentation, and this code snippet from the fluxcp paypal module:

    private function saveDetailsToFile()
    {
        if ($this->txnIsValid) {
            $logDir1 = realpath(FLUX_DATA_DIR.'/logs/transactions');
            $logDir2 = $logDir1.'/'.$this->ipnVariables->get('txn_type');
            $logDir3 = $logDir2.'/'.$this->ipnVariables->get('payment_status');
            $logFile = $logDir3.'/'.$this->ipnVariables->get('txn_id').'.log.php';

            if (!is_dir($logDir2)) {
                mkdir($logDir2, 0600);
            }
            if (!is_dir($logDir3)) {
                mkdir($logDir3, 0600);
            }

            $fp = fopen($logFile, 'w');
            if ($fp) {
                foreach ($this->ipnVariables->toArray() as $key => $value) {
                    fwrite($fp, "$key: $value\n");
                }
                fclose($fp);
                return $logFile;
            }
        }
        return false;
    }

@mleo1
Copy link
Author

mleo1 commented May 12, 2016

It's most common,
I've check some popular servers that accept paypal, this 5 is always what I see.
(I swear, I did not count the donations, kek)

Anyway, guys are welcomed to add more to this lazy somewhat fix.

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