wisp-gg / frontend

The frontend for WISP Game Panel
https://wisp.gg
MIT License
42 stars 15 forks source link

CloudFlare Blocking Viewing .env in File Management #346

Closed falceso closed 1 year ago

falceso commented 1 year ago

Describe the bug

When attempting to edit a .env file in the File Management, you get hit with Something went wrong while trying to perform this action..

Expected Behavior

You are able to view the .env file fine without an error.

Actual Behavior

CloudFlare blocks the request and throws a 403. No file contents is displayed.

2022-11-11T22:44:42.770Z [Service/ERROR] Request files@readFile failed:
Request failed with status code 403
Endpoint: GET /servers/74c445b3/files/read?path=%2F.env
Data: <none>
Body: <!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Attention Required! | Cloudflare</title>
...
            <h2 data-translate="blocked_why_headline">Why have I been blocked?</h2>

            <p data-translate="blocked_why_detail">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.</p>
          </div>

Screenshot of .ENV in File Management

Steps to Reproduce

Step 1 - Visit the File Management Step 2 - Open a .env file that you have previously created within the File Manager Step 3 - Notice the error of Something went wrong while trying to perform this action. in an alert info box above.

Browser Details

Chrome 107

Operating System

Windows 10

Optional additional information

Editing .env is sometimes needed by Bot Developers or other projects that generate a `.env` file. We're not trying to grab the .env file of the File Management. 😂
TrixterTheTux commented 1 year ago

Should work now.

JouanDeag commented 1 year ago

Could you open this again as the issue is still present for me? There seems to be another rule blocking it once again.

TrixterTheTux commented 1 year ago

Check now?

falceso commented 1 year ago

Looks like it working again.

JouanDeag commented 1 year ago

Yep, works!