Skip to content

Use of SameSite=Strict#16386

Merged
williamdes merged 1 commit into
phpmyadmin:masterfrom
rajat315315:fix-16316
Nov 1, 2020
Merged

Use of SameSite=Strict#16386
williamdes merged 1 commit into
phpmyadmin:masterfrom
rajat315315:fix-16316

Conversation

@rajat315315

Copy link
Copy Markdown
Contributor

Signed-off-by: Rajat Jain rajatjain.ix@gmail.com

Description

Added new cookie parameter SameSite=Strict.

Fixes #16316

Before submitting pull request, please review the following checklist:

  • Make sure you have read our CONTRIBUTING.md document.
  • Make sure you are making a pull request against the correct branch. For example, for bug fixes in a released version use the corresponding QA branch and for new features use the master branch. If you have a doubt, you can ask as a comment in the bug report or on the mailing list.
  • Every commit has proper Signed-off-by line as described in our DCO. This ensures that the work you're submitting is your own creation.
  • Every commit has a descriptive commit message.
  • Every commit is needed on its own, if you have just minor fixes to previous commits, you can squash them.
  • Any new functionality is covered by tests.

@rajat315315 rajat315315 force-pushed the fix-16316 branch 2 times, most recently from 57175b2 to 5f66225 Compare October 6, 2020 11:09
@williamdes williamdes added this to the 5.1.0 milestone Oct 6, 2020

@williamdes williamdes left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread libraries/classes/Config.php Outdated
Comment thread libraries/classes/Config.php Outdated

@rajat315315 rajat315315 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@MauricioFauth is it better now?

Comment thread libraries/classes/Config.php Outdated
@rajat315315

Copy link
Copy Markdown
Contributor Author

@MauricioFauth is it better?

Comment thread libraries/classes/Config.php Outdated
@rajat315315

Copy link
Copy Markdown
Contributor Author

Just a request..
Can we add hacktoberfest-accepted label to PR if it gets merged?

Comment thread libraries/classes/Config.php Outdated
'domain' => '',
'secure' => $this->isHttps(),
'httponly' => $httponly,
'samesite' => 'Strict',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not really sure if it's a good idea to hard-code the Strict value. Maybe we could use a configuration directive and use Strict by default. What do you think @williamdes?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I agree, this is a better idea.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@rajat315315 Could you do this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure

@MauricioFauth

Copy link
Copy Markdown
Member

Can we add hacktoberfest-accepted label to PR if it gets merged?

All pull requests for this repository are valid for Hacktoberfest. Don't need to add the hacktoberfest-accepted label. 😉

@MauricioFauth

Copy link
Copy Markdown
Member

@rajat315315 Could you please fix the errors found by phpcs?
https://travis-ci.org/github/phpmyadmin/phpmyadmin/jobs/734257860#L434

@rajat315315

Copy link
Copy Markdown
Contributor Author

Done.

@rajat315315

Copy link
Copy Markdown
Contributor Author

So, I have made samesite as a configuration directive and force-pushed.

@williamdes

Copy link
Copy Markdown
Member

Hi @rajat315315
I appreciate your contribution :)
Could you look at #16406 to add a configuration option?

@rajat315315

Copy link
Copy Markdown
Contributor Author

Oh, ok.. got it!
Sorry, I mis-understood a bit.

@rajat315315

Copy link
Copy Markdown
Contributor Author

Is it better?

@MauricioFauth MauricioFauth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You should add this configuration to the documentation as well.

Comment thread libraries/config.default.php Outdated
Comment thread libraries/classes/Config.php

@williamdes williamdes left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM for now, missing some documentation :)

@rajat315315

Copy link
Copy Markdown
Contributor Author

Do I need to make changes to doc/config.rst ?

@williamdes

Copy link
Copy Markdown
Member

Do I need to make changes to doc/config.rst ?

Yes, please

this will solve

You should add this configuration to the documentation as well.

@rajat315315

Copy link
Copy Markdown
Contributor Author

Done.

Comment thread doc/config.rst
Comment thread doc/config.rst
@rajat315315 rajat315315 force-pushed the fix-16316 branch 3 times, most recently from 2499bfd to 1add2cc Compare October 15, 2020 06:24
Comment thread doc/config.rst Outdated
Signed-off-by: Rajat Jain <rajatjain.ix@gmail.com>

Update Config.php

Polyfilled

version fixes

Signed-off-by: Rajat Jain <rajatjain.ix@gmail.com>

Update libraries/classes/Config.php

Co-authored-by: Maurício Meneghini Fauth <mauricio@fauth.dev>

phpcs fixes

samesite made as configuration directive

bugfix, sets sameSite as global configuration directive

CodeReviewed

Changed config.rst

IETF RFC link aded

Version added

Trailing whitespace fixed.

RFC hyperlink added

trailing whitespace

@williamdes williamdes left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

💯

@williamdes williamdes self-assigned this Nov 1, 2020
@williamdes williamdes merged commit e7feedd into phpmyadmin:master Nov 1, 2020
@williamdes

williamdes commented Nov 1, 2020

Copy link
Copy Markdown
Member

I improved the documentation with ce6bd5b
(valid values is more used in the documentation)
image

@williamdes williamdes mentioned this pull request Jan 15, 2021
6 tasks
williamdes added a commit that referenced this pull request Jan 21, 2021
Pull-request: #16577
Fixes: #16544
Signed-off-by: William Desportes <williamdes@wdes.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider use of SameSite=Strict

3 participants