* added custom color selection for Watermark
* using the same translation as AddStampRequest.customColor for the new watermark.customColor
* fixed the space issue between words
Show permissions as a separate tab
- Move permissions code into a separate for better readability and maintainability.
- Separate `Permissions` node from `Encryption` so that it would be displayed in the frontend as a separate tab.
- Use more user friendly permission labels such as replacing `canModify` with `Modifying` and values such as `Allowed` and `Not Allowed` instead of `true`, `false`.
- Show permissions regardless of the encryption state.
* verifyCerts
* cert info
* Hardening suggestions for Stirling-PDF / certValidate (#2395)
* Protect `readLine()` against DoS
* Switch order of literals to prevent NullPointerException
---------
Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
* some basic html excaping and translation fixing
---------
Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
Co-authored-by: a <a>
The code snippet `input[type=file]{ display: none;}` was unintentionally hiding the upload button, to fix this, it was changed to only target input within `.input-container`
* Fix deserialization failure from String to Map
Fix deserialization failure from String to Map that caused the following exception:
Resolved [org.springframework.web.bind.MethodArgumentNotValidException: Validation failed for argument [0] in public org.springframework.http.ResponseEntity<byte[]> stirling.software.SPDF.controller.api.misc.MetadataController.metadata(stirling.software.SPDF.model.api.misc.MetadataRequest) throws java.io.IOException: [Field error in object 'metadataRequest' on field 'allRequestParams': rejected value [{"customKey1" : "YourCustomKey", "customKeyValue1", "YourCustomValue"}]; codes [typeMismatch.metadataRequest.allRequestParams,typeMismatch.allRequestParams,typeMismatch.java.util.Map,typeMismatch];
* Fix form binding for dynamic Map entries in Change Metadata
- Implemented support for dynamic key-value inputs in Change Metadata form using proper `name` attributes for Map (`allRequestParams`) binding.
- Fix form binding for dynamic Map (`allRequestParams`) entries in Change Metadata as the `allRequestParams` (Map name) was being sent as an empty map.
* Add separate drag and drop area for file choosers
- Add separate drag and drop area for file choosers
### Why?
Previously, when there were multiple file choosers in the same page, if you attempted to drag and drop any files, they would be added to both file choosers as it was designed at first to handle 1 file chooser present, now that we have multiple ones, it is necessary to adapt our design to match the changing functionality.
### Can you not preserve the old overlay when there's only one file chooser present?
Yes, we can, but imagine as a user, you try to drag and drop a file in one page and the fields turn into drag and drop areas then you go to another page and try to drag and drop again but you encounter the old overlay instead, as a user you might get confused and ask yourself "What changed?" or if a user is telling another user the steps to drag and drop files and he didn't know about this case, then it would still be confusing, thus consistency is preferred in this case.
* Update file chooser UI
* Add support for listing and removing selected files and their file icons
- Selected files are listed below the file chooser in a selected files container.
- Users can now remove uploaded/selected files.
- Hide selected files container/box unless there are files selected/uploaded.
- Add separate overlay for each drag & drop area.
## FAQ:
- Why did you assign a unique id to each file? isn't the filename enough?
= Because a user might upload multiple files with the same name, if the user wanted to remove one of them, how would we differentiate between them? we won't be able to unless we assign an identifier, you might argue "we remove based on the filename and size", then what if the user uploaded the same file more than once (intentionally), then we would accidentally remove all the files even though that is not what the user wanted, so going with unique ID approach would prevent this issue/problem from occurring in the first place.
* Rename remove-file css class to remove-selected-file
- Rename remove-file css class to remove-selected-file to avoid css conflict with remove-file in merge.css
* Use input element to dispatch event on file removal
Use the correct element to dispatch "file-input-change" (input element is the correct one).
* Adapt file chooser UI to themes
- Adapt file chooser UI to themes by adjusting their font colors and background colors.
- Make text more visible in overlay by increasing the font size by 0.1rem and setting font weight to 550.
* Remove extra overlay border
- Removing overlay's border as it is unnecessary and only causing a double border issue on the file input container.
* Remove Browse button, highlight file chooser and make it clickable
- Remove browse button.
- Make the entire file chooser container clickable.
- Add glowing effect on hover for file chooser.
- Change color of file chooser on hover.
* Replace crypto.randomUUID() with UUID.uuidv4()
- Replace crypto.randomUUID() with UUID.uuidv4() as crypto.randomUUID() is only supported in secured contexts such as localhost 127.0.0.1 and over HTTPS
* Fix merge file removal not being reflected in file chooser
- Files removed from the list in merge page would now be reflected in the file chooser's container.
* Make inputElement optional in removeFileById
- Make inputElement optional in removeFileById, this way we could control changing inputElements files.
* Add translation support to file chooser
---------
Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
Fix fileInput.js adding event listeners more than once
- Fix a bug that caused fileInput.js to add event listeners more than once per HTML file as it's included in fileSelector fragment in fragments/common.html thus it's being loaded N times where N is the number of file selectors / custom file chooser / file input elements per HTML file, which resulted in each event actions being executed N times as well, which was prevalent in drag and drop operations such as dragging and dropping a file called y.png, it would be duplicated N times (as in /sign path).
Fix a bug that allowed multiple files to be dropped onto a single-file input element
- Fix a bug that allowed multiple files to be dropped onto a single-file input element by accepting only the first file.
* backup
* remove debugs
* oauth to saml and compare fixes etc
* ee flag for saml
* more fixes
* info to debug
* remove unused repo
* spring dev fix for saml
* debugs
* saml stuff
* debugs
* fix
- Fix Array.from syntax in nonmultiple file upload as Array.from(<non-array or string>) returns an empty array which is the case when a file is selected from an input element (when multiple attribute isn't supported) which can be found in Array.from(element.files[0]) -> results in an empty array.