10000 update Cerebrate UI components and respect `skip_proxy` flag by DocArmoryTech · Pull Request #10372 · MISP/MISP · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

update Cerebrate UI components and respect skip_proxy flag #10372

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

Open
wants to merge 4 commits into
base: 2.5
Choose a base branch
from

Conversation

DocArmoryTech
Copy link
Contributor
  • The skip_proxy setting is now fully supported in the Cerebrate UI, including:
    • View: Displays current proxy status.
    • Edit: Allows users to update the setting.
    • Index: Shows the proxy configuration per Cerebrate entry.

This also ensures the skip_proxy setting is properly respected in HTTP requests made via SyncTool::setupHttpSocket(). Previously, the method defaulted to using the 'Server' model key, which caused it to overlook skip_proxy and other configuration values when used by models like 'Cerebrate'.

To resolve this:

  • AppModel::setupHttpSocket() was extended to accept an optional $model parameter. If provided, it is passed through to SyncTool::setupHttpSocket() to ensure the correct settings are used.
  • Backward compatibility is maintained for other subclasses of AppModel that do not yet pass a model identifier.

Tested and confirmed working in production with skip_proxy enabled.

add skip_proxy field to the Cerebrates UI components to add, view, and index configured cerebrates
- `view.ctp` (renders between `URL` and `Owner Organisation`)
- index index.ctp (renders after `Description`)
- add.ctp (renders after `description`)
Added a 4th argument to `AppModel::setupHttpSocket( ..)` (null by default) to allow specification of the `$model` to use when setting up via `SyncTool`.

`$model` defaults to null so that it falls though to the default model used by SyncTool::setupHttpSocket i.e. "Server"
Update the call to `AppModel::setupHttpSocket` to specify the server model as "Cerebrate" and thereby pass the model on to `SyncTool::setupHttpSocket` which picks-up the Cerebrate's `skip_proxy setting`
corrected typo in error handling.
A `SocketException` attempts to access the erros's [sic] getMessage attribute when throwing a BadRequestException:
```
throw new BadRequestException(__('Something went wrong. Error returned: %s', $e->getMessage));
```

missing function parentheses added
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.

1 participant
0