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

Fix wrong protocol in the File Manager Dialog #11526

Merged
merged 2 commits into from Nov 29, 2018

Conversation

Projects
None yet
5 participants
@freakstatic
Copy link
Contributor

freakstatic commented Nov 27, 2018

Questions Answers
Branch? develop
Description? The URL protocol has hard-code to "HTTP". I have change it to check for HTTPS by using the $_SERVER['HTTPS'].
Type? bug fix
Category? BO
BC breaks? Does it break backward compatibility? no
Deprecations? Does it deprecate an existing feature? no
How to test? Open the file dialog in the product description

This change is Reviewable

@prestonBot

This comment has been minimized.

Copy link
Collaborator

prestonBot commented Nov 27, 2018

Hello @freakstatic!

This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community!

@@ -347,7 +347,7 @@
?>"/>
<input type="hidden" id="descending" value="<?php echo $descending ? "true" : "false";
?>"/>
<?php $protocol = 'http';
<?php $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https" : "http";

This comment has been minimized.

@PierreRambaud

PierreRambaud Nov 27, 2018

Contributor

You can use Tools::getShopProtocol() instead :)

This comment has been minimized.

@freakstatic

freakstatic Nov 27, 2018

Contributor

I didn't know about that function...
You are right that will be a better solution :)
Should I create a new pull request?

This comment has been minimized.

@PierreRambaud

PierreRambaud Nov 27, 2018

Contributor

No, you can edit this one :)

This comment has been minimized.

@freakstatic

freakstatic Nov 29, 2018

Contributor

Sorry for the delay :)
I have change it to use the Tools::getShopProtocol()

Improve the way of getting the protocol
Using Tools::getShopProtocol() instead of $_SERVER['HTTPS']

@ntiepresta ntiepresta self-assigned this Nov 29, 2018

@ntiepresta ntiepresta removed their assignment Nov 29, 2018

@Quetzacoalt91

This comment has been minimized.

Copy link
Member

Quetzacoalt91 commented Nov 29, 2018

Thank you @freakstatic

@Quetzacoalt91 Quetzacoalt91 merged commit 8adce79 into PrestaShop:develop Nov 29, 2018

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Quetzacoalt91 Quetzacoalt91 added this to the 1.7.6.0 milestone Nov 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment