Skip to content

Conversation

@SajanGhimire1
Copy link

  • Replace all os.system() calls with safe alternatives to prevent command injection
  • Fix bare except: clause that could catch KeyboardInterrupt and SystemExit
  • Add path sanitization to prevent shell injection attacks
  • Fix PHP version validation with proper regex instead of flawed string comparison
  • Replace hardcoded backslashes with os.sep for cross-platform compatibility
  • Add proper error handling for os.chdir() operations
  • Fix variable reference bugs (self.repo vs repo, self.branch vs branch)
  • Prevent infinite loops in get_local_source() with proper empty path validation
  • Add comprehensive source folder validation before copying
  • Improve error messages and log file display on build failure
  • Fix interactive mode input validation and retry logic

- Replace all os.system() calls with safe alternatives to prevent command injection
- Fix bare except: clause that could catch KeyboardInterrupt and SystemExit
- Add path sanitization to prevent shell injection attacks
- Fix PHP version validation with proper regex instead of flawed string comparison
- Replace hardcoded backslashes with os.sep for cross-platform compatibility
- Add proper error handling for os.chdir() operations
- Fix variable reference bugs (self.repo vs repo, self.branch vs branch)
- Prevent infinite loops in get_local_source() with proper empty path validation
- Add comprehensive source folder validation before copying
- Improve error messages and log file display on build failure
- Fix interactive mode input validation and retry logic
@jahnvi480
Copy link
Contributor

@SajanGhimire1 Thanks for raising the PR for this fix, I would like you to please resolve the conflicts in this PR since now we will also be supporting PHP8.4 there are few changes in build script.
Please fix the issue post which I can review and run the Pipeline on your branch.

@SajanGhimire1
Copy link
Author

@SajanGhimire1 Thanks for raising the PR for this fix, I would like you to please resolve the conflicts in this PR since now we will also be supporting PHP8.4 there are few changes in build script. Please fix the issue post which I can review and run the Pipeline on your branch.

Hi @jahnvi480,
I’ve updated the buildtools.py script with the required changes for PHP 8.4 support and resolved the conflicts. The script now includes input validation, safe command execution, proper removal of old builds, & updated debug/build flags.

@jahnvi480
Copy link
Contributor

@SajanGhimire1 I still see there are 3 conflicts in this file, can you please check.

Updated shebang to use env for portability and corrected import path for BuildUtil.
Add root directory setting for build scripts based on OS
Simplified root directory assignment for builds.
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

Successfully merging this pull request may close these issues.

2 participants