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

Fixed the X-Frame bug #10284

Closed
wants to merge 3 commits into from
Closed

Conversation

blueelvis
Copy link
Contributor

Regarding - #10167

Does this look good?

@blueelvis
Copy link
Contributor Author

@mattab - Really sorry that I mistakenly committed code from 2 different issues. So, this pull request now also contains fix for the issue #10164

@auchri
Copy link

auchri commented Jul 9, 2016

Recommended should be translated into the other languages.

@blueelvis
Copy link
Contributor Author

@auchri - Ok thanks! I will fix it. Is this why the test failed?

@auchri
Copy link

auchri commented Jul 9, 2016

No, PhontomJS crashed during the build.

@@ -41,6 +41,9 @@ function init()
$adapters = array();
foreach ($availableAdapters as $adapter => $port) {
$adapters[$adapter] = $adapter;
if ($adapter == 'PDO\MYSQL') {
$adapters[$adapter] .= ' (Recommended)';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would ideally use a translation. Can you try something like '(' . Piwik::translate('General_Recommended') . ')'?

@tsteur
Copy link
Member

tsteur commented Jul 10, 2016

I think the PhantomJs crash is not related to your change. I will restart the test

@blueelvis
Copy link
Contributor Author

@tsteur @auchri - I have updated the code. Please let me know if there is anything else which needs to be changed :)

@blueelvis
Copy link
Contributor Author

The test is still failing because of pixel difference. Can it be caused because of the fact that I have added the (Recommended) word?

@tsteur
Copy link
Member

tsteur commented Jul 11, 2016

You can see the UI changes / the failing tests here: http://builds-artifacts.piwik.org/piwik/piwik/master/19281/ and they look good. We will fix them once this PR is merged

@tsteur tsteur added the Needs Review PRs that need a code review label Jul 11, 2016
@tsteur
Copy link
Member

tsteur commented Jul 11, 2016

Can someone confirm the PR works as expected? I presume we might need to test this in different browsers.

@mattab
Copy link
Member

mattab commented Jul 11, 2016

Thanks @blueelvis for the PR. did you maybe test the iframe code in several browsers such as IE and Firefox? according to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options it won't work on Chrome anyway..

}
if ($option == 'allow') {
$this->xFrameOptions = null;
if (stripos($option, 'allow-from') !== false) {
Copy link
Member

@mattab mattab Jul 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • maybe you can edit the function docblock comment and add this new allow-from value, and an example of how to set it?

@mattab mattab added this to the 2.16.x (LTS) milestone Jul 15, 2016
@blueelvis
Copy link
Contributor Author

Please close this PR because for some unknown reason, this is not getting updated. New PR has been created #10317

@sgiehl sgiehl closed this Jul 16, 2016
@sgiehl sgiehl added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Jul 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants