Commit Graph
33 Commits
Author SHA1 Message Date
Anthony StirlingandCopilot Autofix powered by AI 1bb3b68a87 Potential fix for code scanning alert no. 11: DOM text reinterpreted as HTML (#3497)
Potential fix for
[https://github.com/Stirling-Tools/Stirling-PDF/security/code-scanning/11](https://github.com/Stirling-Tools/Stirling-PDF/security/code-scanning/11)

To fix the issue, we should avoid using `innerHTML` to insert untrusted
data into the DOM. Instead, we can use DOM manipulation methods like
`createElement` and `appendChild` to construct the required HTML
structure safely. These methods do not interpret strings as HTML,
thereby mitigating the risk of XSS.

Specifically:
1. Replace the `innerHTML` assignment on line 302 with code that creates
the required DOM elements programmatically.
2. Ensure that the `selectedOperation` value is inserted as plain text
using `textContent` or equivalent methods.

---


_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-05-09 18:53:13 +01:00
André SantosandAnthony Stirling 7f8e3d676d Pipeline shows disabled endpoints fix (#2881) (#3282)
# Description of Changes

Previously, the dropdown menu in the pipeline configuration displayed
all endpoints, including disabled ones, and allowed API calls to them.

Changes:

- Updated EndpointInterceptor to correctly parse request URIs and match
them to corresponding endpoint names in settings.yml, ensuring disabled
endpoints are blocked.

- Added a new API endpoint in SettingsController to expose the
endpointStatus map, allowing the frontend to check which endpoints are
disabled.

- Updated pipeline.js to use this new API and hide disabled endpoints
from the dropdown menu.

Tests:

- Created a new Docker Compose setup using a custom settings.yml where
all endpoints are disabled.

- Implemented a test script to run this setup, send API requests to
disabled endpoints, and verify they are correctly blocked.

[Bug Fix Video](https://youtu.be/L1z3jZh8z8E)

Closes #2881

---

## Checklist

### General

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [x] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.

---------

Co-authored-by: Anthony Stirling <[email protected]>
2025-04-09 11:03:40 +01:00
github-actions[bot]andLudy 5605e4d3bb 🤖 format everything with pre-commit by <github-actions[bot]> (#2685)
Auto-generated by [create-pull-request][1]

[1]: https://github.com/peter-evans/create-pull-request

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ludy <[email protected]>
2025-01-14 13:55:46 +00:00
27d2681a97 Feature/save signs (#2127)
* apply fix

* Fixes empty th:action

* Update build.gradle

* fix

* formatting

* Save signatures

* Fix code scanning alert no. 42: Uncontrolled data used in path expression

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix UserServiceInterface

* Merge branch 'feature/saveSigns' of
[email protected]:Stirling-Tools/Stirling-PDF.git into feature/saveSigns

* 0.31.0 bump and further csrf

* formatting

* preview name

* add

* sign doc

* Update translation files (#2128)

Signed-off-by: GitHub Action <[email protected]>
Co-authored-by: GitHub Action <[email protected]>

---------

Signed-off-by: GitHub Action <[email protected]>
Co-authored-by: Dimitrios Kaitantzidis <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: a <a>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
2024-10-30 12:46:44 +00:00
HardikaZalavadia b8115531e2 fix Show Javascript card layout (#1959) 2024-09-24 20:33:13 +01:00
Anthony Stirlinganda 63bdc0d59e Pipeline fixes for json lists + delete func (#1425)
* init

* revert

* pipelines fixes for lists

* pipeline fixes to allow json lists

* formatting

* pipeline changes

* langs

---------

Co-authored-by: a <a>
2024-06-09 13:56:55 +01:00
Rectos VX 5c572a7d89 Update: changed JS to new theme system + Darkmode system 2024-05-05 15:12:30 +04:00
Ludy 67a1529dc7 Change to html5 (#958)
* Change to html5

with Nu Html Checker

* Update scale-pages.html

* Update sign.html

* Update common.html

* Update common.html

* Update login.html
2024-03-21 20:58:01 +00:00
Anthony Stirling f474651f36 lang, save to browser (#923) 2024-03-17 09:33:05 +00:00
Ludy e4a76e96af HTML, CSS, JS and JAVA corrections (#810)
* CSS corrections

* HTML corrections

* JS corrections

* JAVA corrections

* remove tab

* CSS corrections 2

* JS corrections 2

* back to the roots

* max-linie 127

* add slash hr|br

* return bootstrap-icons.css

* return bootstrap-icons.min.css

* return bootstrap.min.css

* Update bootstrap-icons.css

* Update bootstrap-icons.min.css

* Update bootstrap-icons.min.css

* Update bootstrap.min.css

* CSS corrections

* HTML corrections

* JS corrections

* JAVA corrections

* remove tab

* CSS corrections 2

* JS corrections 2

* back to the roots

* max-linie 127

* add slash hr|br

* return bootstrap-icons.css

* Update bootstrap-icons.css

* Bootstrap CSS

* Update prism.css
2024-02-16 21:49:06 +00:00
sbplat 55d4fda01b refactor: normalize files 2024-02-11 11:47:00 -05:00
Anthony Stirling 7ffa447cbc remove logs 2024-01-01 18:57:12 +00:00
Anthony Stirling 88c993367f init lang changes 2024-01-01 14:19:22 +00:00
Anthony Stirling 04acdb3b02 Fix for ANY values and settings button enablement 2024-01-01 13:57:22 +00:00
Anthony Stirling cd3cc15888 minor changes 2024-01-01 13:46:09 +00:00
Anthony Stirling cbac784c57 pipeline 2023-12-31 13:16:04 +00:00
Anthony Stirling f535387ac4 pipeline enhance for MI 2023-12-31 13:05:38 +00:00
Anthony Stirling 8acab77ae3 contextPath fixes 2023-12-28 13:50:31 +00:00
Anthony Stirling 84aebe3851 validate button color 2023-12-27 13:22:28 +00:00
Anthony Stirling f5c285a70f mild cleanup 2023-12-27 12:51:17 +00:00
Anthony Stirling 05977aa3a6 enableAlphaFunctionality 2023-12-26 20:10:37 +00:00
Anthony Stirling 03450454c5 pipeline 2023-12-23 15:47:18 +00:00
Anthony Stirling 93f12d1313 pipeline changes 2023-12-23 12:29:32 +00:00
Anthony Stirling eab9e3cffc changes pipeline 2023-12-20 19:29:13 +00:00
Anthony Stirling 7c26c56210 test 2023-08-20 21:57:19 +01:00
Anthony Stirling d07e3e6522 change add numbers grid and remove files from pipelines 2023-07-16 16:07:08 +01:00
Anthony Stirling 9af1b0cfdc some more changes also broke pipeline a bit 2023-07-15 16:06:33 +01:00
Anthony Stirling 50bcca10e2 pipeline stuff 2023-07-12 00:17:44 +01:00
Anthony Stirling a742c1b034 stuff 2023-07-09 18:10:10 +01:00
Anthony Stirling 46d4ae8fc5 pipeline change 2023-07-02 18:20:23 +01:00
Anthony Stirling 43b0e25bdb modes 2023-06-26 18:23:06 +01:00
Anthony Stirling 3377af1305 api tag 2023-06-25 09:16:32 +01:00
Anthony Stirling 159cee0b39 init many new shit 2023-06-23 23:29:53 +01:00