Commit 868688d0 authored by Nicolas Pernoud's avatar Nicolas Pernoud
Browse files

fix: url encode with only office + updated dependencies

parent 496bbe1c
Pipeline #8504 passed with stages
in 2 minutes and 41 seconds
......@@ -4,17 +4,16 @@ go 1.15
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.4.2 // indirect
github.com/golang/protobuf v1.4.3 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/oschwald/maxminddb-golang v1.7.0
github.com/secure-io/sio-go v0.3.1
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
golang.org/x/net v0.0.0-20200822124328-c89045814202
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sys v0.0.0-20200828194041-157a740278f4
golang.org/x/text v0.3.3 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/protobuf v1.25.0 // indirect
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897
golang.org/x/net v0.0.0-20201031054903-ff519b6c9102
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43
golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf
golang.org/x/text v0.3.4 // indirect
google.golang.org/appengine v1.6.7 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
)
This diff is collapsed.
......@@ -164,6 +164,7 @@ a.navbar-item.is-active {
margin: 1rem;
width: 12rem;
transition: 0.3s;
overflow: visible; /* Necessary for bulma 0.9.1 to allow menus appearance. Try to remove with coming bulma releases. */
}
.card {
......
This diff is collapsed.
......@@ -14,9 +14,9 @@
"author": "Nicolas Pernoud",
"license": "AGPL-3.0-or-later",
"devDependencies": {
"bulma": "^0.9.0",
"bulma": "^0.9.1",
"clean-css-cli": "^4.3.0",
"node-sass": "^4.14.1",
"node-sass": "^5.0.0",
"rimraf": "^3.0.2"
}
}
#!/bin/bash
WD="$(
cd "$(dirname "$0")"
pwd -P
)"
# Generate certificates
sudo rm -rf ${WD}/data
mkdir -p ${WD}/data/certs
openssl genrsa -out ${WD}/data/certs/tls.key 2048
openssl req -new -key ${WD}/data/certs/tls.key -out ${WD}/data/certs/tls.csr -subj "/C=US/ST=YourState/L=YourCity/O=OnlyOffice-Certificates/CN=onlyoffice.local"
openssl x509 -req -days 365 -in ${WD}/data/certs/tls.csr -signkey ${WD}/data/certs/tls.key -out ${WD}/data/certs/tls.crt
$WD/down.sh
docker run -d --name onlyoffice \
--restart unless-stopped \
......@@ -13,7 +23,7 @@ docker run -d --name onlyoffice \
-e "DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+')" \
onlyoffice/documentserver
docker exec -it onlyoffice /var/www/onlyoffice/documentserver/npm/node_modules/.bin/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false'
docker exec -it onlyoffice /var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/default.json -I -e 'this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false'
docker exec -it onlyoffice /bin/bash -c 'echo "$DOCKER_HOST vestibule.127.0.0.1.nip.io" >>/etc/hosts'
docker exec -it onlyoffice /bin/bash -c 'echo "$DOCKER_HOST unsecureddav.vestibule.127.0.0.1.nip.io" >>/etc/hosts'
docker exec -it onlyoffice /bin/bash -c 'echo "$DOCKER_HOST userdav.vestibule.127.0.0.1.nip.io" >>/etc/hosts'
......
@charset "UTF-8";
/*!
@charset "UTF-8";/*!
* animate.css - https://animate.style/
* Version - 4.1.0
* Version - 4.1.1
* Licensed under the MIT license - http://opensource.org/licenses/MIT
*
* Copyright (c) 2020 Animate.css
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
// Imports
import * as Messages from "/services/messages/messages.js";
import * as Auth from "/services/auth/auth.js";
import { AnimateCSS, GetType, Truncate } from "/services/common/common.js";
import { AnimateCSS, GetType, Truncate, EncodeURIWithSpecialsCharacters } from "/services/common/common.js";
import { Open } from "/components/davs/open.js";
import { Edit } from "/components/davs/edit.js";
import { Share } from "/components/davs/share.js";
......@@ -196,7 +196,8 @@ export class Explorer {
body: JSON.stringify({
sharedfor: "external_editor",
lifespan: 1,
url: this.hostname + file.path,
// Decode and recode to prevent discrepancies between encoding on browsers
url: EncodeURIWithSpecialsCharacters(this.hostname + decodeURIComponent(file.path)),
readonly: false,
}),
});
......
......@@ -32,7 +32,7 @@
<div class="navbar-brand">
<div class="navbar-item">
<a class="button is-primary is-rounded is-outlined" href="https://www.github.com/nicolaspernoud/Vestibule" target="_blank" rel="noopener noreferrer">
<span>4.3.55</span>
<span>4.3.56</span>
<span class="icon">
<svg
class="svg-inline--fa fa-github fa-w-16"
......
......@@ -7,7 +7,7 @@
<link rel="icon" href="assets/brand/onlyoffice_favicon.ico" />
<title>{{.Title}}</title>
<script defer src="{{.OnlyOfficeServer}}/web-apps/apps/api/documents/api.js"></script>
<script defer src="onlyoffice/onlyoffice.js"></script>
<script defer type="module" src="onlyoffice/onlyoffice.js"></script>
</head>
<style>
......
import { EncodeURIWithSpecialsCharacters } from "/services/common/common.js";
openDocument();
async function openDocument() {
const urlParams = new URLSearchParams(window.location.search);
const file = urlParams.get("file");
const file = EncodeURIWithSpecialsCharacters(urlParams.get("file"));
const token = encodeURIComponent(urlParams.get("token"));
const user = urlParams.get("user");
const mtime = urlParams.get("mtime");
const fileName = file.split("/").pop();
const fileName = urlParams.get("file").split("/").pop();
const fileExtension = file.split(".").pop();
const key = (await digestMessage(fileName + mtime)).substring(0, 20);
const config = {
......
......@@ -49,3 +49,7 @@ export function GetType(file) {
}
export const Truncate = (input) => (input.length > 12 ? `${input.substring(0, 12)}...` : input);
export function EncodeURIWithSpecialsCharacters(str) {
return encodeURI(str).replace(/[!'()*]/g, escape);
}
......@@ -67,6 +67,8 @@ export const Icons = [
"backspace",
"backward",
"bacon",
"bacteria",
"bacterium",
"bahai",
"balance-scale",
"balance-scale-left",
......@@ -773,6 +775,7 @@ export const Icons = [
"signal",
"signature",
"sim-card",
"sink",
"sitemap",
"skating",
"skiing",
......@@ -965,12 +968,15 @@ export const Icons = [
"user-times",
"users",
"users-cog",
"users-slash",
"utensil-spoon",
"utensils",
"vector-square",
"venus",
"venus-double",
"venus-mars",
"vest",
"vest-patches",
"vial",
"vials",
"video",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment