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

DebugMode is true by default ⚠️ #636

Closed
emnbdx opened this issue Mar 11, 2024 · 9 comments · Fixed by #637
Closed

DebugMode is true by default ⚠️ #636

emnbdx opened this issue Mar 11, 2024 · 9 comments · Fixed by #637

Comments

@emnbdx
Copy link
Contributor

emnbdx commented Mar 11, 2024

Since commit fe49ef57d3f0c948a2a5bbd53db1aab367c89b45 DebugMode is now true by default.

This could be problematic because it allows anyone to access the API client and secret if deployed in a production environment.

Here is a sample of what i get display directly on browser on my test environment

Screenshot 2024-03-11 at 23 54 29

@mihaimoiseanu this one is for you I think you forget to remove it after testing

For everybody looking for a workaround you have to set DebugMode manually to false

$mangoPayApi = new MangoPay\MangoPayApi();
...
$mangoPayApi->Config->DebugMode = false;
@impronta48
Copy link

Really severe! A lot of secret info exposed and payment system broken. I've downgraded to .26

@victorberson99
Copy link

Same issue here ! Had to downgrade to 0.26 too

@emnbdx
Copy link
Contributor Author

emnbdx commented Mar 15, 2024

You can just set debugmode to false instead of downgrade, as I said.
But i understand downgrade when you are not satisfied by a version ;)

@antoinep-origami
Copy link

Same here. It sure can be fixed easily by setting debug mode to false, but I am not sure to understand why the debug mode is now enabled by default, seems like an error-prone behaviour to me.

@emnbdx
Copy link
Contributor Author

emnbdx commented Mar 27, 2024

@antoinep-origami when you examine the code, you'll notice that DebugMode is annotated with the comment [INTERNAL USAGE ONLY]. This leads me to believe that its inclusion was likely an oversight by a developer.

@emnbdx
Copy link
Contributor Author

emnbdx commented Mar 27, 2024

I create a PR to fix this !
#637

@florentdestremau
Copy link

same issue here wtf, discovered on live user accounts !

@OpJePl44tsm4n
Copy link

same, please merge the fix!

@launay12u
Copy link

Really weird, and without any information about this change 👎🏼
This can cause huge security problems.

@iulian03 iulian03 linked a pull request Apr 12, 2024 that will close this issue
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 a pull request may close this issue.

7 participants