PHPOffice / PHPOffice/PHPWord

addImage *needs* a way to specify a memory image

Open
#1,908 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Report
Dominant language
PHP
Stars
7.6k
Forks
2.7k
Avg merge
4d 13h
Merged PRs (30d)
15

Description

Without this, it is a blatant security hole for literally everyone using the library.

Say I let people upload images. If the start of the image is, say, http:// something, file:// something, ends in .php, go on... This is a horrible security hole. You need a separate method for memory images.

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

Start by locating the addImage implementation and trace how its image argument is handled. Define completion as a separate way to provide image data from memory without treating user-controlled content as a path or URL, with regression coverage for the reported input cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.