Skip to content

Jetpack Sync Actor: only include IP address after running checks#8612

Merged
zinigor merged 2 commits intomasterfrom
update/jetpack-sync-actor-ip
Jan 26, 2018
Merged

Jetpack Sync Actor: only include IP address after running checks#8612
zinigor merged 2 commits intomasterfrom
update/jetpack-sync-actor-ip

Conversation

@roccotripaldi
Copy link
Copy Markdown
Contributor

@roccotripaldi roccotripaldi commented Jan 25, 2018

If applied this PR will:

  • only send IP address to the server during login related events
  • allow site administrators to completely opt out of sending IP address
  • use jetpack_protect_get_ip instead of relying on $_SERVER global

To test:

  • try logging in, logging out, and a failed login attempt and ensure IP is sent upstream
  • try filtering jetpack_sync_actor_ip_address to false and ensure IP is not sent upstream
  • any other event, writing a post for example, should not send IP upstream regardless of filter

- only send actor's IP Address during login-related events && the filter allows it
- adds 2 unit tests
@roccotripaldi roccotripaldi force-pushed the update/jetpack-sync-actor-ip branch from 7a87844 to b99225c Compare January 26, 2018 02:34
*
* @param bool True if we should send the IP Address
*/
if ( ! apply_filters( 'jetpack_sync_actor_ip_address', true ) ) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we could just return apply_filters( 'jetpack_sync_actor_ip_address', true )

Copy link
Copy Markdown
Contributor

@lezama lezama left a comment

Choose a reason for hiding this comment

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

🚢 it, cc @zinigor

@zinigor zinigor added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Jan 26, 2018
@zinigor zinigor merged commit 1ae23f5 into master Jan 26, 2018
@zinigor zinigor deleted the update/jetpack-sync-actor-ip branch January 26, 2018 12:35
jeherve added a commit that referenced this pull request Jan 29, 2018
zinigor pushed a commit that referenced this pull request Jan 30, 2018
* Changelog 5.8: create base for changelog.

* Update 5.8 release post link

* fix 5.8 release date

* Updates to plugin description

* Changelog: add #8499

* Changelog: add #8506

* Changelog: add #8509

* Changelog: add #8516

* Changelog: add #8517

* Changelog: add #8523

* Changelog: add #8547

* Changelog: add #8496

* Changelog: add #8584

* Changelog: add #8595

* Changelog: add #8445

* Changelog: add #8431

* Changelog: add #8284

* Changelog: add #8270

* Changelog: add #8124

* Changelog: add #8581

* Changelog: add #8463

* Changelog: add #8568 (#8646)

* Updates to testing list and changelog

* Changelog: add #8443

* Changelog: add #8459

* Changelog: add #8469

* Changelog: add #8464

* Changelog: add #8478 and #8479

* Changelog: add #8483

* Changelog: add #8488

* Changelog: add #8513

* Changelog: add #8555

* Changelog: add #8565

* Changelog: add #8601

* Changelog: add #8612

* Changelog: add first pass at Search items.

* Changelog: add more info to help test Search.

* Changelog: add #8144

* Changelog: add #8313

* Changelog: add #8419

* Changelog: add #8465

* Changelog: add #8515

* Changelog: add #8587

* Changelog: add #8591

* Changelog: add #8659

* Changelog: add #8661

* Changelog: add #8671

* Changelog: add 5.7.1 to archived changelog too.

* Reverted changes to readme, removed entry about backups.
@kraftbj kraftbj removed the [Status] Ready to Merge Go ahead, you can push that green button! label Oct 13, 2020
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.

6 participants