Commit Graph

92 Commits (f304fd46299cffa52b0fb4c1373bd8f0789bf1ad)

Author SHA1 Message Date
Pranav Kant 67141ab0c2 Fix fetching older revisions in case of LDAP login 8 years ago
Pranav Kant 3bfa02e438 No need to tear down FS; we do it when logging the user out 8 years ago
Pranav Kant d0afe97f13 Handle non-existing edit_groups 8 years ago
Pranav Kant 7599628bf3 Handle case when no group mentioned in testing group exists 8 years ago
Andras Timar a4b42bc776 UserCanWrite is a boolean property 8 years ago
Andras Timar dcd3f5f7c6 addAllowedFrameDomain 'blob:' for printing dialog in Chrome 8 years ago
Pranav Kant a12ff8d0d2 security: Support WOPI's PostMessageOrigin
Adds a new property PostMessageOrigin to WOPI's CheckFileInfo.
The inner frame then only sends message to target with origin
mentioned in this property.

Also implement editor initialization WOPI specs. Inner frame
sends a App_LoadingStatus message to us when ready, and we send
Host_PostmessageReady when we are ready.
8 years ago
Pranav Kant f4a40b1067 Log in as owner, not editor during checkFileInfo WOPI call
This seems to not work in some cases when files are shared.
8 years ago
Pranav Kant 2bca5aa2cb Handle cache for test server options 8 years ago
Pranav Kant 7e64777f4a Store canwrite property in DB
Move whether the file is editable or not logic when generating a
token and store it in the DB with the access token instead of
checking it dynamically in WOPI calls.
8 years ago
Pranav Kant c158859040 Setup FS during artificial login; new internal method logoutUser 8 years ago
Pranav Kant d0589c3e48 Second param not needed here 8 years ago
Pranav Kant 93416e52a4 Kill edit for specific groups code 8 years ago
Pranav Kant 408fe08d5e Set UserCanWrite WOPI property if file is updatable 8 years ago
Pranav Kant 74dd2a6d8a Login as editor, not owner
This token belongs to editor, not owner, so its wrong to login as
owner.
8 years ago
Pranav Kant 1ad1f667ee Simplify edit group checking algorithm
Rather than making a server call, which seems to be not working
always anyways, use a foolproof method for this.
8 years ago
Pranav Kant e593c34fdd New test server option for specific groups 8 years ago
Pranav Kant 145854400e New 'Use OOXML by default' option in admin settings 8 years ago
Pranav Kant c24c5a0439 Only allow users to edit documents if part of edit groups
If edit group setting is not set in Collabora Online settings,
then allow all users.
8 years ago
Miklos Vajna d6b65b7983 bccu#2033 Respect WOPI action names
Don't assume that the action name is 'edit' all the time. Instead, if
it's view, then initialize leaflet with permission=readonly.
8 years ago
Lukas Reschke 0806876fd0 Merge pull request #109 from timar/master
remove unused 'Save new documents to' setting, fixes #76
8 years ago
Pranav Kant 70016ad4de Fix incorrect constructor signature
Fallback from c166c7b189
8 years ago
Andras Timar 6fc595eb93 remove unused 'Save new documents to' setting, fixes #76 8 years ago
Pranav Kant e3d3f6bec3 Remove unused fields 8 years ago
Pranav Kant 05b4d568f6 Add UserId, UserFriendlyName to WOPI CheckFileInfo 8 years ago
Pranav Kant c166c7b189 Respect default settings
Support for default settings when there is none provided by user
was already in lib/appconfig.php

But we were using the CoreConfig object always which queries the
database; lets use the appConfig object so that if the value is
missing in the database, we still have the default value to take
care of the app.
8 years ago
Jan Holesovsky dd832f3501 Improve the error message. 8 years ago
Pranav Kant be84ac71f8 Explicit is better than implicit
For consistency, lets close the opened user login session here
also.
8 years ago
Pranav Kant 45d76a1c68 Add support for opening and editing files from external storage 8 years ago
Pranav Kant 82906c7cd7 No need to make the user login here, and fix incorrect userid
Setting up FS is enough to get the correct file version. No need
to make the user login here.

File version would be in owner's FS, not editor, so
s/editorid/ownerid/
8 years ago
Pranav Kant e0da6fa8d1 Create a dummy memory session before signing in as user
Since this WOPI Put method is executed when loolwsd hits owncloud
server, it has no session or probably invalid session data. Even
though WOPI Put file operation initiated by loolwsd succeds, i.e
file is successfully put into owncloud storage and versioned, it
returns an HTTP 500 Internal server error as response to loolwsd
which causes problem on loolwsd side messing up its state.

Following trace can be observed in webserver's error logs after
HTTP 500 is returned:

PHP Fatal error:  Uncaught exception 'Exception' with message 'Session has been closed - no further changes to the session are allowed'
in /var/www/html/owncloud9/lib/private/session/internal.php:135
Stack trace:
 #0 /var/www/html/owncloud9/lib/private/session/internal.php(60): OC\\Session\\Internal->validateSession()
 #1 /var/www/html/owncloud9/lib/private/session/cryptosessiondata.php(150): OC\\Session\\Internal->set('encrypted_sessi...', 'e747091469b9905...')
 #2 /var/www/html/owncloud9/lib/private/session/cryptosessiondata.php(64): OC\\Session\\CryptoSessionData->close()
 #3 [internal function]: OC\\Session\\CryptoSessionData->__destruct()
 #4 {main}\n  thrown in /var/www/html/owncloud9/lib/private/session/internal.php on line 135

Creating a dummy memory session, setting it as current session,
and then setting the desired user session seems to address this
problem and does not emit HTTP 500 anymore.
8 years ago
Pranav Kant 3235b886ad Add a revision history sidebar 8 years ago
Ashod Nakashian 0517f76c32 Shared documents now show correct editor's name in the change hisotry 8 years ago
Ashod Nakashian fc81c07f70 Saving through WOPI registers the change as the owner 8 years ago
Ashod Nakashian 0c508a09e0 Support for file versioning in WOPI 8 years ago
Pranav Kant bb01949a9a Use new owncloud9 addMenuEntry plugin
... to add new odf files from main 'Files' app
8 years ago
Pranav Kant b138109820 Don't load all documents when only one is clicked on from 'Files' 8 years ago
Andras Timar 8534ee60ba CA chain cert name change 8 years ago
Andras Timar 39b860ffa2 do not query UI language for each doc, it's same for all 8 years ago
Andras Timar e22151a2b5 Pass the lang paramater to loleaflet from ownCloud user settings, which controls UI language 8 years ago
Andras Timar cb271b50e5 Merge pull request #47 from timar/master
frame-src is deprecated on Firefox, but Safari wants it
8 years ago
Jan Holesovsky 69a2880800 Send the hint too. 8 years ago
Andras Timar 8f61bbe08f frame-src is deprecated on Firefox, but Safari wants it 8 years ago
Henry Castro efcf28abc2 Add ulrsrc attribute when create new documents 8 years ago
Jan Holesovsky ea47464459 More improvements in the error handling. 8 years ago
Jan Holesovsky 2508e550fc Content Security Policy: frame-src is deprecated, use child-src instead. 8 years ago
Jan Holesovsky 155f9578fc MemCache is not mandatory any more; but used if available. 8 years ago
Jan Holesovsky 80cc8bf197 Improved error messages around discovery.xml. 8 years ago
Andras Timar faf5c1007f allow HTTP-only mode for testing/trial 8 years ago
Andras Timar 2b302fa1af local file access method is deprecated by WOPI 8 years ago