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