php / php/php-src

stream_context_create silently ignores invalid options

Open
#16,105 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Category: Streams Extension: openssl Feature
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

for example
$context=stream_context_create([ 'ssl' => [ 'verify_peername' => FALSE, ] ]);
the property verify_peername should be verify_peer_name but $context is not FALSE and no error is reported

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the example with stream_context_create, then locate its option validation in the PHP source. Done means the misspelled verify_peername option no longer passes silently and the resulting behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, php
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.