Research alternatives to curl request on post apply event during cron updates

Created on 1 November 2022, over 1 year ago
Updated 5 September 2023, 10 months ago

Problem/Motivation

CronUpdater currently invokes cURL directly "so that we're not relying on any third-party classes or other code which may have changed during the update." This may be problematic for three reasons:

  1. cURL may not always be available--especially on low end hosting or tightly secured self-hosted environments.
  2. cURL is almost infinitely configurable, and it's notoriously difficult to account for all of its variability across different operating systems, host configurations, etc.--a large part of the reason Guzzle was created, i.e., to abstract these problems away.
  3. cURL is an HTTP client, which means it sends requests over the Web. This could be problematic for both technical and security reasons. For example, a request could get blocked or intercepted at numerous places on the way in and out of the server, including proxies, caching layers, and server hardening software like Suhosin. It could also be intercepted by bad actors who block or fake it, DDOS the endpoint, or just gain information about your security configuration from it.

Proposed resolution

We should see if there's an alternative to HTTP requests altogether for this feature. This could include, for example, a shell process. Of course, every approach carries its own benefits and drawbacks, so we need to understand the tradeoffs.

Remaining tasks

  1. Research and analyze alternatives
  2. Discuss the options and choose on
  3. Create a follow-up issue to document and implement the chosen option
πŸ“Œ Task
Status

Closed: outdated

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States TravisCarden

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024