Giter Club home page Giter Club logo

external's Introduction

External sites

REUSE status

This application allows an admin to add a link in the Nextcloud web interface Apps menu that points to an external website. By simply entering the URL and the name for the external site, an icon appears. When this icon is clicked by a user, the external website appears in the Nextcloud frame. For the user, this external site appears as if it is part of Nextcloud but, in fact, this can be any external URL.

🛠 State of maintenance

While there are many things that could be done to further improve this app, the app is currently maintained with limited effort. This means:

  • The main functionality works for the majority of the use cases
  • We will ensure that the app will continue to work like this for future releases and we will fix bugs that we classify as 'critical'
  • We will not invest further development resources ourselves in advancing the app with new features
  • We do review and enthusiastically welcome community PR's

We would be more than excited if you would like to collaborate with us. We will merge pull requests for new features and fixes. We also would love to welcome co-maintainers.

OCS API

It is also possible to get the sites via an OCS endpoint. The request must be authenticated. Only sites for the user´s language are returned:

curl  -H "OCS-APIRequest: true" \
  https://admin:admin@localhost/ocs/v2.php/apps/external/api/v1

Response

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>200</statuscode>
  <message>OK</message>
 </meta>
 <data>
  <element>
   <id>23</id>
   <name>Homepage</name>
   <url>https://localhost/index.php</url>
   <type>link</type>
   <redirect>0</redirect>
   <icon>https://localhost/external.svg</icon>
  </element>
 </data>
</ocs>

Explanation

Field Type Description
id int Numeric identifier of the site
name string Name of the site, ready to use
url string URL that should be framed/linked to
redirect int Whether the link should be opened inline or in a new window
type string Can be one of link, settings or quota; see this issue for details
icon string Full URL of the icon that should be shown next to the name of the link

ETag / If-None-Match

The API provides an ETag for the sites array. In case the ETag matches the given value, a 304 Not Modified is delivered together with an empty response body.

Capability

The app registers a capability, so clients can check that before making the actual OCS request:

<?xml version="1.0"?>
<ocs>
 ...
 <data>
  <capabilities>
   ...
   <external>
    <v1>
     <element>sites</element>
     <element>device</element>
     <element>groups</element>
     <element>redirect</element>
    </v1>
   </external>
   ...

external's People

Contributors

andyscherzinger avatar blizzz avatar carlschwan avatar christophwurst avatar come-nc avatar dependabot[bot] avatar eglia avatar gary-kim avatar jancborchardt avatar jenserat avatar juliushaertl avatar lukasreschke avatar marcelklehr avatar mariusbluem avatar michag86 avatar morrisjobke avatar nextcloud-bot avatar nextcloud-command avatar nickvergessen avatar pierreozoux avatar preya avatar provokateurin avatar pvince81 avatar rakekniven avatar rullzer avatar skjnldsv avatar tobiaskaminsky avatar tsia avatar valdnet avatar vorph1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

external's Issues

Add site with occ command

Hi, how can I add a site using the occ command?

php occ config:app:set external <name> --value VALUE

I'm not sure what to put in the <name> field.

Thanks

unable to access external side links pointing to LAN resources from the Android/iOS apps

@MorrisJobke asked me to open an issue ticket in this repository to discuss the described issue.

Actual behavior

If you set-up external side links pointing to LAN resources, these are not accessible from the Android/iOS apps, because the apps are trying to access the sides directly.

Nextcloud app -> Nextcloud server
              -> External site link 1
              -> External site link 2
              -> ...

Expected behavior

If you' access a web page by using an external side entry in the Android/iOS apps, access should be proxied via Nextcloud and displayed properly.

Nextcloud app -> Nextcloud server
              -> Nextcloud server -> External site link 1
              -> Nextcloud server -> External site link 2
              -> Nextcloud server -> ...

Steps to reproduce

  1. setup an external side link pointing to an intranet page on your LAN.
  2. Open the Nextcloud app.
  3. Select an external side link.
    -> Website not available (for parts of a second) before it is overwritten by Sorry Modified.

###References
nextcloud/android#1619 (comment)
nextcloud/android#1608

Environment

Server Configuration

OS: Linux 3.16.47
Web server: Apache2 2.4.29
Database: MariaDB 10.0.32
PHP version: 5.6.29
Nextcloud version: 12.0.3
External app version: 2.0.3

Client Configuration

Android version: 7.1.2
Nextcloud app version: 2.0.0

iOS version: 11.0.3
Nextcloud for iOS version: 2.17.8.00002

Logs

Web server error log

Nothing special has been logged related to this problem.

Nextcloud app protocol

Nothing has been logged.

Not working at all

Steps to reproduce

  1. add Site
  2. try to click on it
  3. wait for nothing to happen

Expected behaviour

Site should open (One of the Sites lays on the same server, but is managed per vhost, one of the sites is only avaibel per https, the third is a pretty normal website)

Actual behaviour

noting happens

Server configuration

Operating system:Ubuntu 16.04 LTS

Web server: LAMP

Database: mysql2

PHP version: 7.0.18-0.ubuntu0.16.04.01

**Nextcloud version:**12

Where did you install Nextcloud from:

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

Enabled:

  • activity: 2.5.2
  • bruteforcesettings: 1.0.2
  • calendar: 1.5.3
  • comments: 1.2.0
  • contacts: 1.5.3
  • dav: 1.3.0
  • deck: 0.2.0
  • external: 2.0.3
  • federatedfilesharing: 1.2.0
  • federation: 1.2.0
  • files: 1.7.2
  • files_accesscontrol: 1.2.4
  • files_automatedtagging: 1.2.2
  • files_pdfviewer: 1.1.1
  • files_sharing: 1.4.0
  • files_texteditor: 2.4.1
  • files_trashbin: 1.2.0
  • files_versions: 1.5.0
  • files_videoplayer: 1.1.0
  • firstrunwizard: 2.1
  • gallery: 17.0.0
  • groupfolders: 1.0.2
  • logreader: 2.0.0
  • lookup_server_connector: 1.0.0
  • mail: 0.6.4
  • nextcloud_announcements: 1.1
  • notifications: 2.0.0
  • oauth2: 1.0.5
  • password_policy: 1.2.2
  • provisioning_api: 1.2.0
  • richdocuments: 1.12.33
  • serverinfo: 1.2.0
  • sharebymail: 1.2.0
  • survey_client: 1.0.0
  • systemtags: 1.2.0
  • theming: 1.3.0
  • twofactor_backupcodes: 1.1.1
  • updatenotification: 1.2.0
  • user_ldap: 1.2.1
  • workflowengine: 1.2.0
    Disabled:
  • admin_audit
  • encryption
  • files_external
  • user_external
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

### Client configuration
**Browser:**
Firefox
Google Chrome
**Operating system:**
Arch Linux
### Logs

#### Nextcloud log (data/owncloud.log)

Insert your Nextcloud log here


#### Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Request : allow external web site in a new tab

Some of my external link doesn't support intégration and need to be openend in a new tab.

I know the way to push CTRL + click, but it's not very userfriendly to ask user to make that each time they click on a specifical external link.

Is it possible to add this feature please ?

Substitution domain in url of sites

In older versions of "external sites" in the field of url it was possible to write so: /docs/
and it worked with all domain nextcloud:

In new version need to write absolute path: https://nextcloud.org/docs/
but then other domains show a blank screen..

Can you do something like this: https://*/docs/
or return the old version?

Error on save url:

{"ocs":{"meta":{"status":"failure","statuscode":400,"message":null},"data":"\u0423\u043a\u0430\u0437\u0430\u043d \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 URL"}}

Nextcloud 12.0.3

Make it possible to have links which include the name instead of the id

It seems the URLs use the link id as a reference to where to go.
This can create problems if you setup multiple instances and want all the links to an external website to be the same.
so, it would be great if admins could use links which include a keyword or maybe the lowercase version of the name identifier.

Ordering, Icons, DropDown, Links

NC: 12.0.4
External Sites: 2.0.3

  • Installed NC and had a few troubles with Instance/my provider so I thought maybe it's an bug I haven't found your app after installing, but it turns out it was just "hidden" in "Additional Settings" and haven't got an extra menu item "External Sites" (like in your screenshot) any longer

  • Then I would appreciate a way to change the order of my external sites which is not possible. But there is an App to change the order of menu items ("App Order"), so this is not a problem, but a small hint in the description of this app would be a nice thing.

  • In my version is a drop down field for every link element with options "Normal, Setting, Quota". I have no idea what this is about

  • I really would like a few more icons (FB, Twitter..) and a way to upload them by administration and links to open in a new window and not as an iframe. This is not possible in my version but it is in your screenshot?! How it comes? Or am I missing something?

Getting around 'X-Frame-Options' to 'sameorigin' by offering option to open link in new tab

I'm using NextCloud as a dashboard for all of my self-hosted software (~15 'external' links), but many of them don't work because of the 'X-Frame-Options' to 'sameorigin' directive.

Would it be possible to instruct some of the external links to open in a new tab or even to add this as a feature in an upcoming release?

Perhaps an additional dropdown with an option for 'iframe, new tab or new window'?

Signature data not found

Steps to reproduce

  1. download app from https://apps.nextcloud.com/apps/external
  2. sudo -u www-data php /home/apps/cloud/occ integrity:check-app external

Actual behaviour

- external
	- EXCEPTION
		- OC\IntegrityCheck\Exceptions\InvalidSignatureException
		- Signature data not found.

Server configuration

Operating system: Linux Debian 8

Web server: Apache 2.4

PHP version: 5.6.30-0+deb8u1

Nextcloud version: 12.0 beta 1

Nextcloud configuration:

{
    "system": {
        "instanceid": "ocljd87kma0y",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.laupe.cz"
        ],
        "datadirectory": "\/home\/cloud_data",
        "overwrite.cli.url": "https:\/\/cloud.laupe.cz",
        "dbtype": "mysql",
        "version": "12.0.0.16",
        "dbname": "cloud",
        "dbhost": "localhost",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_from_address": "cloud",
        "mail_smtpmode": "php",
        "mail_domain": "laupe.io",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "default_language": "cs_CZ",
        "knowledgebaseenabled": false,
        "log_rotate_size": 104857600,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "redis": {
            "host": "\/var\/run\/redis\/redis.sock",
            "port": 0
        },
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "tempdirectory": "\/tmp\/nextcloudtemp",
        "updater.release.channel": "beta",
        "htaccess.RewriteBase": "\/",
        "appstore.experimental.enabled": true,
        "maintenance": false,
        "loglevel": 2,
        "data-fingerprint": "3f446c2ed3072f029036cfa630607537",
        "theme": "",
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

Nextcloud log (data/owncloud.log)

{"reqId":"aNMUFVPhsVx5VVso0mJv","level":3,"time":"2017-05-09T17:20:44+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Undefined index: admin at \/home\/apps\/cloud\/apps\/news\/lib\/Config\/AppConfig.php#91","userAgent":"--","version":"12.0.0.16"}
{"reqId":"aNMUFVPhsVx5VVso0mJv","level":3,"time":"2017-05-09T17:20:44+00:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"file_get_contents(\/home\/apps\/cloud\/apps\/external\/appinfo\/signature.json): failed to open stream: No such file or directory at \/home\/apps\/cloud\/lib\/private\/IntegrityCheck\/Helpers\/FileAccessHelper.php#39","userAgent":"--","version":"12.0.0.16"}

Feature Request: Add option to not embed, but open link

Currently some Options prevent the usage of external sites.
A very easy way to have at least a workaround for this, could be to have an option, which is not embedding the site, but links to it.

Steps to reproduce

https://docs.nextcloud.com/server/12/admin_manual/configuration_server/external_sites.html
Describes why some sites are not working in the bottom section.

Expected behaviour

During the creation of an external site, one should choose between "embed" and "link".
When choosing "embed" the behaviour is as known.
When choosing "link" the new link will open in a new tab or window.
Optional: links should be marked as "external" in some way.

Actual behaviour

Most sites with X-Frame-Options or Content-Security-Policy are not usable at all.
Linking to external sites seems not possible.

Server configuration

Nextcloud version: 12.0.3

Add an option to reorder the links

Extracted from #69 by @Dubidubiduu

Then I would appreciate a way to change the order of my external sites which is not possible. But there is an App to change the order of menu items ("App Order"), so this is not a problem, but a small hint in the description of this app would be a nice thing.

Template variable in the link

I'm a Nextcloud admin.
I'd like to put links under quota that point to my billing system.
My billing system expects an email in the url for the bill.

Implementation proposal

We create a function that allow Nextcloud admin to have special chars in the url, like say {{ email }}, and this would be replaced at runtime, by the actual email of the user.

so then, in the admin settings, I'd write:

https://example.org/buy_now/?email={{ email }}

And as a user, when I click on the link, I'd go to:

https://example.org/buy_now/[email protected]

What do you think about this feature?

White images on android navigation drawer

I get the images via API and use them on the navigation drawer in our android app.
The background color of this navigation drawer is white, which leads to not "showing" the external icons as they are then white on white.
Only settings.svg is working as it is black by default.

This is also the same if you look into the web UI and open the upper right menu.

I will need some black ones for proper displaying them.

Custom Development

Are you available to do a customization of this for me? If so, pm me your rates.

What I need done:

-Setup groups of links with name and icon for the group.
-Be able to move links between the different groups. Existing app links and External app links.
-Have main group stationary in the direct header menu and the other groups as the group icon with a dropdown list of links with their associated icons.

Multiple quota links

For example:

  • Button 1 Buy more storage
  • Button 2 Edit your personal Settings (For LDAP management UI)

You are currently able to create multiple quota links, but only one will be shown. Under the quota bar is enough space to show multiple buttons.

What do you think? @nickvergessen

Downloads from external app not possible

Steps to reproduce

  1. Install a local copy of RAWGraphs ( http://app.rawgraphs.io/ )
  2. Embed as external page
  3. Try to download created graph via the "download" button (in Firefox)

Expected behaviour

Should open a "safe as" browser popup

Actual behaviour

Nothing happens.

Server configuration

Operating system:
Ubuntu
Web server:
Apache2
Database:
MySQL
PHP version:
7.1
Nextcloud version: (see Nextcloud admin page)
12.0

I guess this is a intended security feature, but is there any way this could be enabled?
Edit: only happens with Firefox, Chome downloads the file fine.

Show internal site

Hi, i wanted to ask if it would be possible that the nextcloud server itself loads the site contents. At the moment i am able to embed for example my local openhab server in the frame and visit it if i am also in the LAN. It would be awesome when this would work from anywhere.

greets

Open in new tab

It's really great that external sites has the ability to handle sites that can't be embedded, however, it would be really great if there were an option to launch them in a new tab instead of closing/overwriting my Nextcloud tab.

Slashes in filenames on Google Drive causes sync error

The title says it all. Whenever someone creates a document on Google Docs that contains a slash / in the filename, it causes a sync-error in my Nextcloud client. I expect other illegal characters could also produce the same error, but I have only experienced it with slashes.

Login into Drive and changing the file name fixes the error, but maybe some type of escape function should be implemented for illegal file name characters.

NC and External app are both most recent stable versions and the server is a RPI with the latest Raspbian.

JavaScript error in /settings/admin/additional

apps.js?v=cfb712b…-38:812 Uncaught ReferenceError: marked is not defined
    at Object.initialize (apps.js?v=cfb712b…-38:812)
    at HTMLDocument.<anonymous> (apps.js?v=cfb712b…-38:959)
    at j (core.js?v=cfb712b…-38:2)
    at Object.fireWith [as resolveWith] (core.js?v=cfb712b…-38:2)
    at Function.ready (core.js?v=cfb712b…-38:2)
    at HTMLDocument.I (core.js?v=cfb712b…-38:2)

Caused by d277e20. This breaks the /settings/admin/additional interface kinda badly…

cc @nickvergessen @juliushaertl

Types of links

The admin should be able to add links to the settings menu as well

Suggestion is:

  • link (current)
  • settings (right side menu)
  • quota (?)

use of custom icons causes a security warning

I had opened nextcloud/apps#20 because no separate repository existed that time.

Affected apps

The external sites app

Expected behaviour

The external sites app shouldn't cause a security warning when custom icons have been copied to the ./apps/external/img directory and have been assigned to external site links. Additional icons in that directory should be excluded from the security check or the app should be extended to load icons from a different location which is not checked by the security function.

2016-12-11 11_19_26-administration - nextcloud

Actual behaviour

The external sites app causes a security warning when custom icons are copied to the ./apps/external/img directory and assigned to an external site link.

Steps to reproduce

  1. Copy a new icon file to the directory ./apps/external/img
  2. Open Administration -> Additional settings -> External sites
  3. Assign a new icon to an external site link.
  4. Install a new app etc. so that a complete security check is forced. (unfortunately I don't know if it's possible to force a check from the command line.
  5. A security warning is shown because an unknown file was found in the directory:

2016-12-12 20_09_23-mozilla firefox

Server configuration

Operating system: Linux 3.2.82
Web server: Apache2 2.4.23
Database: MariaDB 5.5.53
PHP version: 5.6.23
Nextcloud version: 10.0.2

Client configuration

Browser: Firefox 50.0.2
Operating system: Windows 7

Logs

No errors have been logged

Run as defaultApp

Steps to reproduce

  1. Write defaultapp=>external ib config.php
  2. Try to login

I Think its a routing problem.
After login the URL should be something like external/1 but it is external/ thats the Problem

Advice on using External Sites for outside network access to Nextcloud

Hello,

I'm hoping advice can be provided on how I can solve an issue I'm having with External sites when accessing Nextcloud from outside our network.

I've installed within our network a Nextcloud Server and a Guacamole (remote access) server. From within my network I can connect to our Guacamole server from the Nextcloud External Sites icon with no issues as we have the Guacamole server using https through reverse proxy (from our Nethserver).

Problem occurs though when I login to our Nextcloud from outside our network. The Guacamole External Sites will not load. The error I'm seeing is:

took too long to respond

Do you have any advice on how to access an external site link from Nextcloud when accessing Nextcloud from outside our network? From within our network it works fine. I suspect this is a DNS issue or timeout issue.

Any advice you can provide would be greatly appreciated.

Thank you.

Login

I installed without issue and runs. {Nextcloud 12.0.5, MySQL, php7}.
My interface looks different with less options.
Is it possible to have an option to log into the external site. I'm using both Joomal3 and NextCloud 12.0.5 and want to be able to have just one login.

My URL = https://gbranlaw.com/nxtcld2018/index.php/login

image

Steps to reproduce

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

Server configuration

Operating system:

Web server:

Database:

PHP version:

Nextcloud version: (see Nextcloud admin page)

Where did you install Nextcloud from:

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or

Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

Client configuration

Browser:

Operating system:

Logs

Nextcloud log (data/owncloud.log)

Insert your Nextcloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

No more anpg icon with the 3.1.0 version

Can you integrate in your next version the apng icon please ?
With the old version (before version 3.0.0) i could seen my animated icon on nextcloud for my external site...
Thanks,

Add icons to the management section

A new layout was introduced with #35

admin_-nextcloud-_2017-05-30_11 27 16

But this hides some info, which helps to quickly find the entry you were looking for.
It would be cool, if we could have icons for the devices:

  • Android App
  • iOS App
  • Desktop client
  • Browser
  • All devices

@jancborchardt could you help with those please? :)

Maybe we could also add icons for the languages in the server one day, so there is a flag for each language which can be used in the overview to identify the entries quickly.

Feature Request: ED25519 SSH-Keypairs

Hey there!

I'm changing all my servers from RSA to ECC (ED25519) SSH-Keypairs. I hope NC will support it soon, so I can switch my file server too. Thanks in advance! <3

Security problem with url parameters

Hi,
would it be possible to encrypt the url-parameters, so that you cannot see the userid in the source-code of the iframe?

The user has to enter a salt and a password, so he can decrypt the url-parameter later in his php script.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.