Compare commits
9 Commits
v0.36.1
...
Frooodle-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60ced19f64 | ||
|
|
63eb94c0a6 | ||
|
|
0a6b6453b2 | ||
|
|
2931e348a9 | ||
|
|
c71ca21532 | ||
|
|
0e4c3d5dbc | ||
|
|
92cabf125e | ||
|
|
818bed3154 | ||
|
|
1f1c414138 |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -76,7 +76,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.7"
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Pip requirements
|
||||
run: |
|
||||
|
||||
11
.github/workflows/multiOSReleases.yml
vendored
11
.github/workflows/multiOSReleases.yml
vendored
@@ -74,7 +74,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ matrix.os }}" = "windows-latest" ]; then
|
||||
mv "build/jpackage/Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}.exe" "Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}-${{ matrix.platform }}.${{ matrix.ext }}"
|
||||
mv "build/jpackage/Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}.exe" "Stirling-PDF-${{ matrix.platform }}-installer.${{ matrix.ext }}"
|
||||
elif [ "${{ matrix.os }}" = "macos-latest" ]; then
|
||||
mv "build/jpackage/Stirling-PDF-${{ steps.versionNumberMac.outputs.versionNumberMac }}.dmg" "Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}-${{ matrix.platform }}.${{ matrix.ext }}"
|
||||
else
|
||||
@@ -85,7 +85,12 @@ jobs:
|
||||
- name: Upload Installer Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Stirling-PDF-${{ matrix.platform }}-installer.{{ matrix.ext }}
|
||||
path: Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}-${{ matrix.platform }}.${{ matrix.ext }}
|
||||
name: Stirling-PDF-${{ matrix.platform }}-installer.${{ matrix.ext }}
|
||||
path: Stirling-PDF-${{ matrix.platform }}-installer.${{ matrix.ext }}
|
||||
retention-days: 1
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload binaries to release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: ./Stirling-PDF-${{ matrix.platform }}-installer.${{ matrix.ext }}
|
||||
|
||||
8
.github/workflows/releaseArtifacts.yml
vendored
8
.github/workflows/releaseArtifacts.yml
vendored
@@ -59,13 +59,13 @@ jobs:
|
||||
files: ./build/launch4j/Stirling-PDF-Server${{ matrix.file_suffix }}.exe
|
||||
|
||||
- name: Rename jar binaries
|
||||
run: cp ./build/libs/Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}.jar ./build/libs/Stirling-PDF-Server${{ matrix.file_suffix }}.jar
|
||||
run: cp ./build/libs/Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}.jar ./build/libs/Stirling-PDF${{ matrix.file_suffix }}.jar
|
||||
|
||||
- name: Upload Assets jar binaries
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: ./build/libs/Stirling-PDF-Server${{ matrix.file_suffix }}.jar
|
||||
name: Stirling-PDF-Server${{ matrix.file_suffix }}.jar
|
||||
path: ./build/libs/Stirling-PDF${{ matrix.file_suffix }}.jar
|
||||
name: Stirling-PDF${{ matrix.file_suffix }}.jar
|
||||
overwrite: true
|
||||
retention-days: 1
|
||||
if-no-files-found: error
|
||||
@@ -73,7 +73,7 @@ jobs:
|
||||
- name: Upload jar binaries to release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: ./build/libs/Stirling-PDF-Server${{ matrix.file_suffix }}.jar
|
||||
files: ./build/libs/Stirling-PDF${{ matrix.file_suffix }}.jar
|
||||
|
||||
|
||||
push-ui:
|
||||
|
||||
@@ -27,7 +27,7 @@ ext {
|
||||
}
|
||||
|
||||
group = "stirling.software"
|
||||
version = "0.36.1"
|
||||
version = "0.36.3"
|
||||
|
||||
|
||||
java {
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
let errorMessage = null;
|
||||
|
||||
try {
|
||||
const response = await fetch(url, {method: 'POST', body: formData});
|
||||
const response = await window.fetchWithCsrf(url, {method: 'POST', body: formData});
|
||||
const contentType = response.headers.get('content-type');
|
||||
|
||||
if (!response.ok) {
|
||||
|
||||
@@ -8,7 +8,6 @@ window.fetchWithCsrf = async function(url, options = {}) {
|
||||
if (cookieValue) {
|
||||
return cookieValue;
|
||||
}
|
||||
|
||||
const csrfElement = document.querySelector('input[name="_csrf"]');
|
||||
return csrfElement ? csrfElement.value : null;
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
/*<![CDATA[*/
|
||||
const urlGetApiKey = /*[[@{/api/v1/user/get-api-key}]]*/ "/api/v1/user/get-api-key";
|
||||
/*]]>*/
|
||||
let response = await fetch(urlGetApiKey, { method: 'POST' });
|
||||
let response = await window.fetchWithCsrf(urlGetApiKey, { method: 'POST' });
|
||||
if (response.status === 200) {
|
||||
let apiKey = await response.text();
|
||||
manageUIState(apiKey);
|
||||
@@ -213,7 +213,7 @@
|
||||
/*<![CDATA[*/
|
||||
const urlUpdateApiKey = /*[[@{/api/v1/user/update-api-key}]]*/ "/api/v1/user/update-api-key";
|
||||
/*]]>*/
|
||||
let response = await fetch(urlUpdateApiKey, { method: 'POST' });
|
||||
let response = await window.fetchWithCsrf(urlUpdateApiKey, { method: 'POST' });
|
||||
if (response.status === 200) {
|
||||
let apiKey = await response.text();
|
||||
manageUIState(apiKey);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<script>
|
||||
window.stirlingPDF = window.stirlingPDF || {};
|
||||
</script>
|
||||
|
||||
<script th:src="@{'/js/fetch-utils.js'}"></script>
|
||||
<!-- jQuery -->
|
||||
<script th:src="@{'/js/thirdParty/jquery.min.js'}"></script>
|
||||
<script th:src="@{'/js/thirdParty/jquery.validate.min.js'}"></script>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
</script>
|
||||
<script th:src="@{'/js/homecard.js'}"></script>
|
||||
<script th:src="@{'/js/githubVersion.js'}"></script>
|
||||
<form th:action="@{'/dummyFormToPopulateCSRF'}" method="post" enctype="multipart/form-data"></form>
|
||||
<nav class="navbar navbar-expand-xl">
|
||||
<div class="container ">
|
||||
<a class="navbar-brand" th:href="@{'/'}" style="display: flex;">
|
||||
@@ -376,7 +377,6 @@
|
||||
<span class="go-pro-badge" th:text="#{enterpriseEdition.button}"></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<!-- Settings Button -->
|
||||
<a href="#" class="nav-link" data-bs-toggle="modal" data-bs-target="#settingsModal" th:title="#{navbar.settings}">
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<head>
|
||||
<th:block th:insert="~{fragments/common :: head(title=#{merge.title}, header=#{merge.header})}"></th:block>
|
||||
<link rel="stylesheet" th:href="@{'/css/merge.css'}">
|
||||
<script th:src="@{'/js/thirdParty/pdf-lib.min.js'}"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
const processFile = async (file) => {
|
||||
const origFileUrl = URL.createObjectURL(file);
|
||||
const formPdfBytes = await fetch(origFileUrl).then(res => res.arrayBuffer());
|
||||
const formPdfBytes = await window.fetchWithCsrf(origFileUrl).then(res => res.arrayBuffer());
|
||||
const pdfDoc = await PDFDocument.load(formPdfBytes, { ignoreEncryption: true });
|
||||
|
||||
const pages = pdfDoc.getPages();
|
||||
|
||||
@@ -102,7 +102,7 @@ document.querySelector('#pdfForm').addEventListener('submit', async (e) => {
|
||||
formData.append('certFile', certInput.files[0]);
|
||||
}
|
||||
try {
|
||||
const response = await fetch(e.target.action, {
|
||||
const response = await window.fetchWithCsrf(e.target.action, {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user