-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Improve support for FreeBSD #8997
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
Conversation
Add isFreeBSD function Signed-off-by: Alonso Cárdenas <11150989+alonsobsd@users.noreply.github.com>
|
All contributors have signed the CLA ✍️ ✅ |
|
A comment should be added to the leadin of the file, around line 128. You’ll see others to model it after. |
|
New Issues (10)Checkmarx found the following issues in this Pull Request
Fixed Issues (24)Great job! The following issues were fixed in this Pull Request
Use @Checkmarx to reach out to us for assistance. Just send a PR comment with Examples: |
|
I have read the CLA Document and I hereby sign the CLA |
|
|
What is this actually trying to fix? |
Well, some sections of zaproxy app that use isLinux not work on FreeBSD because there are not a isFreeBSD to evaluate. For example, when I try to change some settings as Selenium one on FreeBSD it is not working (not open) and it avoids to run AjaxSpider tests because it always try to use linux webdrivers embedded. As I wrote above, Linux functions/procedures could works without issues on FreeBSD. This is the reason for what I add freebsd to isLinux function. Take a look a the following: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276730 for more information. |
|
That's an issue in the Selenium add-on (where it should be fixed), not core. (And to be clear not opposing to improve support for FreeBSD but we should fix the issues properly first.) |
I think so, but isLinux() is part of core, right? and Selenium use it. E.x. https://github.com/zaproxy/zap-extensions/blob/main/addOns/selenium/src/main/java/org/zaproxy/zap/extension/selenium/internal/FirefoxProfileManager.java , zap/src/main/java/org/zaproxy/zap/extension/autoupdate/ExtensionAutoUpdate.java and maybe some other extensions use it too. Or do you prefer replace all of them with isLinux and isFreeBSD ones? |
|
The Selenium add-on exception referenced in the FreeBSD issue has been fixed in https://github.com/zaproxy/zap-extensions/pull/6252/files#diff-91668c143b89f41523fe09a9663affd88d94172bf1d73be092c0588e7966000cR66 If the logic done for Linux also works with FreeBSD I'm fine with changing Heads up to this change https://github.com/zaproxy/zap-extensions/pull/6661/files#diff-91668c143b89f41523fe09a9663affd88d94172bf1d73be092c0588e7966000cR145 This will start to (explicitly) call the Selenium Manager to get the path of the Firefox binary, I don't know if their Linux binary also works with FreeBSD. |
Signed-off-by: Alonso Cárdenas <11150989+alonsobsd@users.noreply.github.com>
I have removed isFreeBSD method.
I seems like selenium-manager has not FreeBSD support. Maybe it works using linux compat on FreeBSD. Anyway, with this change I can modify some driver paths from zaproxy options.
Greetings |
Signed-off-by: Alonso Cárdenas <11150989+alonsobsd@users.noreply.github.com>
Signed-off-by: Alonso Cárdenas <11150989+alonsobsd@users.noreply.github.com>
Note that this is for the creation of a Firefox profile for/by the Client Side Integration add-on: https://www.zaproxy.org/docs/desktop/addons/client-side-integration/firefox-profile/ It does not use the Firefox binary from the Selenium options but I will look at changing to use it. |
|
Thank you! |




This patch fixes issues that occur when users try to change certain configurations, such as Selenium settings, on FreeBSD. Without it, the AJAX spider does not work correctly. In most cases, Linux routines can be used similarly on FreeBSD. I have added an isFreeBSD() function to be used when specific handling for FreeBSD is necessary.