Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude paths act differently between PHP and Rsync file copier #176

Open
tedbow opened this issue Jun 1, 2023 · 2 comments
Open

Exclude paths act differently between PHP and Rsync file copier #176

tedbow opened this issue Jun 1, 2023 · 2 comments

Comments

@tedbow
Copy link

tedbow commented Jun 1, 2023

figure out here https://www.drupal.org/project/automatic_updates/issues/3363937

What our case was

  1. we staged an operation
  2. We put a file in the active directory
  3. we called commit() with an excluded absolute path of the file from 2). The purpose of this is we don't want the file from 2) deleted on commit()

Result
PHP file syncer: this file was not deleted on commit
Rsync file syncer: this file was deleted on commit

We solved this by making the path relative but it seems like they should act the same way.

I chatted with @TravisCarden about this and the absolute path should only be used if it is in the source(stage in this case) directory.

@wimleers
Copy link
Collaborator

wimleers commented Jun 2, 2023

the absolute path should only be used if it is in the source(stage in this case) directory.

Right. But shouldn't \PhpTuf\ComposerStager\Infrastructure\Value\PathList\PathList::assertValidInput() validate that assumption?

(See my write-up at https://www.drupal.org/project/automatic_updates/issues/3363937#comment-15087236.)

@TravisCarden
Copy link
Collaborator

TravisCarden commented Jul 31, 2023

What do you think, @tedbow? Should we add validation to ensure relative paths?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants