├── .gitignore
├── mix-manifest.json
├── www
├── img
│ └── logo.png
├── js
│ └── index.js
├── index.html
└── css
│ └── index.css
├── fonts
└── vendor
│ └── bootstrap-sass
│ └── bootstrap
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ └── glyphicons-halflings-regular.woff2
├── plugins
├── cordova-plugin-whitelist
│ ├── NOTICE
│ ├── package.json
│ ├── CONTRIBUTING.md
│ ├── plugin.xml
│ ├── RELEASENOTES.md
│ ├── doc
│ │ ├── zh
│ │ │ └── README.md
│ │ ├── ko
│ │ │ └── README.md
│ │ ├── ja
│ │ │ └── README.md
│ │ ├── pl
│ │ │ └── README.md
│ │ ├── de
│ │ │ └── README.md
│ │ ├── it
│ │ │ └── README.md
│ │ ├── es
│ │ │ └── README.md
│ │ └── fr
│ │ │ └── README.md
│ ├── src
│ │ └── android
│ │ │ └── WhitelistPlugin.java
│ ├── README.md
│ └── LICENSE
├── fetch.json
├── android.json
└── ios.json
├── resources
├── assets
│ ├── sass
│ │ ├── app.scss
│ │ └── _variables.scss
│ └── js
│ │ ├── components
│ │ ├── Example.vue
│ │ ├── CreateTask.vue
│ │ ├── Navigation.vue
│ │ └── Todo.vue
│ │ ├── bootstrap.js
│ │ └── app.js
├── lang
│ └── en
│ │ ├── pagination.php
│ │ ├── auth.php
│ │ ├── passwords.php
│ │ └── validation.php
└── views
│ └── welcome.blade.php
├── README.md
├── webpack.mix.js
├── config.xml
├── hooks
└── README.md
└── package.json
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /platforms/*
3 | *.log
4 | .DS_Store
5 |
--------------------------------------------------------------------------------
/mix-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "/www/js/app.js": "/www/js/app.js",
3 | "/www/css/app.css": "/www/css/app.css"
4 | }
--------------------------------------------------------------------------------
/www/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/viraj-khatavkar/todo-mobile-app-cordova-vue/HEAD/www/img/logo.png
--------------------------------------------------------------------------------
/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/viraj-khatavkar/todo-mobile-app-cordova-vue/HEAD/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/viraj-khatavkar/todo-mobile-app-cordova-vue/HEAD/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/viraj-khatavkar/todo-mobile-app-cordova-vue/HEAD/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/viraj-khatavkar/todo-mobile-app-cordova-vue/HEAD/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/NOTICE:
--------------------------------------------------------------------------------
1 | Apache Cordova
2 | Copyright 2012 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
--------------------------------------------------------------------------------
/plugins/fetch.json:
--------------------------------------------------------------------------------
1 | {
2 | "cordova-plugin-whitelist": {
3 | "source": {
4 | "type": "registry",
5 | "id": "cordova-plugin-whitelist@1"
6 | },
7 | "is_top_level": true,
8 | "variables": {}
9 | }
10 | }
--------------------------------------------------------------------------------
/resources/assets/sass/app.scss:
--------------------------------------------------------------------------------
1 |
2 | // Fonts
3 | @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
4 |
5 | // Variables
6 | @import "variables";
7 |
8 | // Bootstrap
9 | @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
10 |
11 | #app { padding-top: 70px }
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ToDo Mobile App using Cordova and Vue
2 |
3 | To run the code in browser, follow the below steps:
4 |
5 | 1. Clone the repo
6 | 2. Install dependencies with `yarn` or `npm install`
7 | 3. Visit the browser and play with it
8 | 4. To run in your mobile device, you need to follow the steps as mentioned in the article
9 |
--------------------------------------------------------------------------------
/plugins/android.json:
--------------------------------------------------------------------------------
1 | {
2 | "prepare_queue": {
3 | "installed": [],
4 | "uninstalled": []
5 | },
6 | "config_munge": {
7 | "files": {}
8 | },
9 | "installed_plugins": {
10 | "cordova-plugin-whitelist": {
11 | "PACKAGE_NAME": "io.cordova.hellocordova"
12 | }
13 | },
14 | "dependent_plugins": {}
15 | }
--------------------------------------------------------------------------------
/plugins/ios.json:
--------------------------------------------------------------------------------
1 | {
2 | "prepare_queue": {
3 | "installed": [],
4 | "uninstalled": []
5 | },
6 | "config_munge": {
7 | "files": {}
8 | },
9 | "installed_plugins": {
10 | "cordova-plugin-whitelist": {
11 | "PACKAGE_NAME": "io.cordova.hellocordova"
12 | }
13 | },
14 | "dependent_plugins": {}
15 | }
--------------------------------------------------------------------------------
/webpack.mix.js:
--------------------------------------------------------------------------------
1 | const { mix } = require('laravel-mix');
2 |
3 | /*
4 | |--------------------------------------------------------------------------
5 | | Mix Asset Management
6 | |--------------------------------------------------------------------------
7 | |
8 | | Mix provides a clean, fluent API for defining some Webpack build steps
9 | | for your Laravel application. By default, we are compiling the Sass
10 | | file for the application as well as bundling up all the JS files.
11 | |
12 | */
13 |
14 | mix.js('resources/assets/js/app.js', 'www/js')
15 | .sass('resources/assets/sass/app.scss', 'www/css');
16 |
--------------------------------------------------------------------------------
/resources/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
17 | 'next' => 'Next »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/resources/assets/js/components/Example.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Example Component
7 |
8 |
9 | I'm an example component!
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
24 |
--------------------------------------------------------------------------------
/resources/lang/en/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cordova-plugin-whitelist",
3 | "version": "1.3.2",
4 | "description": "Cordova Whitelist Plugin",
5 | "cordova": {
6 | "platforms": [
7 | "android"
8 | ]
9 | },
10 | "repository": {
11 | "type": "git",
12 | "url": "https://github.com/apache/cordova-plugin-whitelist"
13 | },
14 | "keywords": [
15 | "cordova",
16 | "whitelist",
17 | "ecosystem:cordova",
18 | "cordova-android"
19 | ],
20 | "engines": {
21 | "cordovaDependencies": {
22 | "0.0.0": {
23 | "cordova-android": ">=4.0.0"
24 | },
25 | "2.0.0": {
26 | "cordova": ">100"
27 | }
28 | }
29 | },
30 | "author": "Apache Software Foundation",
31 | "license": "Apache-2.0"
32 | }
33 |
--------------------------------------------------------------------------------
/resources/assets/js/bootstrap.js:
--------------------------------------------------------------------------------
1 |
2 | window._ = require('lodash');
3 |
4 | /**
5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support
6 | * for JavaScript based Bootstrap features such as modals and tabs. This
7 | * code may be modified to fit the specific needs of your application.
8 | */
9 |
10 | try {
11 | window.$ = window.jQuery = require('jquery');
12 |
13 | require('bootstrap-sass');
14 | } catch (e) {}
15 |
16 | /**
17 | * We'll load the axios HTTP library which allows us to easily issue requests
18 | * to our Laravel back-end. This library automatically handles sending the
19 | * CSRF token as a header based on the value of the "XSRF" token cookie.
20 | */
21 |
22 | window.axios = require('axios');
23 |
24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
25 |
--------------------------------------------------------------------------------
/resources/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Passwords must be at least six characters and match the confirmation.',
17 | 'reset' => 'Your password has been reset!',
18 | 'sent' => 'We have e-mailed your password reset link!',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that e-mail address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/resources/assets/js/components/CreateTask.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 |
18 |
38 |
--------------------------------------------------------------------------------
/resources/assets/sass/_variables.scss:
--------------------------------------------------------------------------------
1 |
2 | // Body
3 | $body-bg: #f5f8fa;
4 |
5 | // Borders
6 | $laravel-border-color: darken($body-bg, 10%);
7 | $list-group-border: $laravel-border-color;
8 | $navbar-default-border: $laravel-border-color;
9 | $panel-default-border: $laravel-border-color;
10 | $panel-inner-border: $laravel-border-color;
11 |
12 | // Brands
13 | $brand-primary: #3097D1;
14 | $brand-info: #8eb4cb;
15 | $brand-success: #2ab27b;
16 | $brand-warning: #cbb956;
17 | $brand-danger: #bf5329;
18 |
19 | // Typography
20 | $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/";
21 | $font-family-sans-serif: "Raleway", sans-serif;
22 | $font-size-base: 14px;
23 | $line-height-base: 1.6;
24 | $text-color: #636b6f;
25 |
26 | // Navbar
27 | $navbar-default-bg: #fff;
28 |
29 | // Buttons
30 | $btn-default-color: $text-color;
31 |
32 | // Inputs
33 | $input-border: lighten($text-color, 40%);
34 | $input-border-focus: lighten($brand-primary, 25%);
35 | $input-color-placeholder: lighten($text-color, 30%);
36 |
37 | // Panels
38 | $panel-default-heading-bg: #fff;
39 |
--------------------------------------------------------------------------------
/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ToDo - Pusher
4 |
5 | A ToDo app for Pusher using Cordova and Vue
6 |
7 |
8 | Apache Cordova Team
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/hooks/README.md:
--------------------------------------------------------------------------------
1 |
21 | # Cordova Hooks
22 |
23 | Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide.
24 |
--------------------------------------------------------------------------------
/resources/assets/js/components/Navigation.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
14 |
15 |
16 |
24 |
25 |
26 |
27 |
28 |
31 |
--------------------------------------------------------------------------------
/resources/assets/js/components/Todo.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 |
{{ task.title }}
13 |
14 |
15 | Delete
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
43 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "npm run development",
5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
7 | "watch-poll": "npm run watch -- --watch-poll",
8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
9 | "prod": "npm run production",
10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11 | },
12 | "devDependencies": {
13 | "axios": "^0.15.3",
14 | "bootstrap-sass": "^3.3.7",
15 | "cross-env": "^3.2.3",
16 | "jquery": "^3.1.1",
17 | "laravel-mix": "0.*",
18 | "lodash": "^4.17.4",
19 | "vue": "^2.1.10"
20 | },
21 | "dependencies": {
22 | "vue-router": "^2.5.3",
23 | "cordova-plugin-whitelist": "1"
24 | },
25 | "cordova": {
26 | "plugins": {
27 | "cordova-plugin-whitelist": {}
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
21 |
22 | # Contributing to Apache Cordova
23 |
24 | Anyone can contribute to Cordova. And we need your contributions.
25 |
26 | There are multiple ways to contribute: report bugs, improve the docs, and
27 | contribute code.
28 |
29 | For instructions on this, start with the
30 | [contribution overview](http://cordova.apache.org/contribute/).
31 |
32 | The details are explained there, but the important items are:
33 | - Sign and submit an Apache ICLA (Contributor License Agreement).
34 | - Have a Jira issue open that corresponds to your contribution.
35 | - Run the tests so your patch doesn't break existing functionality.
36 |
37 | We look forward to your contributions!
38 |
--------------------------------------------------------------------------------
/resources/assets/js/app.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * First we will load all of this project's JavaScript dependencies which
4 | * includes Vue and other libraries. It is a great starting point when
5 | * building robust, powerful web applications using Vue and Laravel.
6 | */
7 |
8 | require('./bootstrap');
9 |
10 | window.Vue = require('vue');
11 |
12 | import Vue from 'vue'
13 | import VueRouter from 'vue-router'
14 |
15 | // 1. Define route components.
16 | // These can be imported from other files
17 | let Todo = require('./components/Todo.vue');
18 |
19 | // 2. Define some routes
20 | // Each route should map to a component. The "component" can
21 | // either be an actual component constructor created via
22 | // Vue.extend(), or just a component options object.
23 | // We'll talk about nested routes later.
24 | const routes = [
25 | { path: '/tasks', component: Todo }
26 | ]
27 |
28 | // 3. Create the router instance and pass the `routes` option
29 | // You can pass in additional options here, but let's
30 | // keep it simple for now.
31 | const router = new VueRouter({
32 | routes
33 | })
34 |
35 | Vue.use(VueRouter);
36 |
37 | Vue.component('navigation', require('./components/Navigation.vue'));
38 | Vue.component('create-task', require('./components/CreateTask.vue'));
39 |
40 | // 4. Create and mount the root instance.
41 | // Make sure to inject the router with the router option to make the
42 | // whole app router-aware.
43 | window.onload = function () {
44 | const app = new Vue({
45 | router
46 | }).$mount('#app');
47 | }
48 |
49 | router.push('/tasks');
50 | // app.initialize();
51 |
--------------------------------------------------------------------------------
/www/js/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | var app = {
20 | // Application Constructor
21 | initialize: function() {
22 | document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
23 | },
24 |
25 | // deviceready Event Handler
26 | //
27 | // Bind any cordova events here. Common events are:
28 | // 'pause', 'resume', etc.
29 | onDeviceReady: function() {
30 | this.receivedEvent('deviceready');
31 | },
32 |
33 | // Update DOM on a Received Event
34 | receivedEvent: function(id) {
35 | var parentElement = document.getElementById(id);
36 | var listeningElement = parentElement.querySelector('.listening');
37 | var receivedElement = parentElement.querySelector('.received');
38 |
39 | listeningElement.setAttribute('style', 'display:none;');
40 | receivedElement.setAttribute('style', 'display:block;');
41 |
42 | console.log('Received Event: ' + id);
43 | }
44 | };
45 |
46 | app.initialize();
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
24 | Whitelist
25 | Cordova Network Whitelist Plugin
26 | Apache 2.0
27 | cordova,whitelist,policy
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/www/index.html:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | Todo App - Cordova and VueJs
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/resources/views/welcome.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Laravel
9 |
10 |
11 |
12 |
13 |
14 |
66 |
67 |
68 |
69 | @if (Route::has('login'))
70 |
71 | @if (Auth::check())
72 |
Home
73 | @else
74 |
Login
75 |
Register
76 | @endif
77 |
78 | @endif
79 |
80 |
81 |
82 | Laravel
83 |
84 |
85 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/RELEASENOTES.md:
--------------------------------------------------------------------------------
1 |
21 | # Release Notes
22 |
23 | ### 1.3.2 (Feb 28, 2017)
24 | * [CB-12236](https://issues.apache.org/jira/browse/CB-12236) Fixed `RELEASENOTES` for `cordova-plugin-whitelist`
25 |
26 | ### 1.3.1 (Dec 07, 2016)
27 | * [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.3.1
28 | * [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…"
29 | * Edit package.json license to match SPDX id
30 | * [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version.
31 |
32 | ### 1.3.0 (Sep 08, 2016)
33 | * [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies
34 | * Updated installation section
35 | * Plugin uses `Android Log class` and not `Cordova LOG class`
36 | * Add pull request template.
37 | * [CB-10866](https://issues.apache.org/jira/browse/CB-10866) Adding engine info to `package.json`
38 | * [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md
39 |
40 | ### 1.2.2 (Apr 15, 2016)
41 | * add note about redirects
42 | * [CB-10624](https://issues.apache.org/jira/browse/CB-10624) remove error message from `whitelist.js`, which leaves it empty
43 |
44 | ### 1.2.1 (Jan 15, 2016)
45 | * [CB-10194](https://issues.apache.org/jira/browse/CB-10194) info tag prints for ios when not applicable
46 |
47 | ### 1.2.0 (Nov 18, 2015)
48 | * removed **iOS** engine check from `plugin.xml`
49 | * [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest
50 | * [CB-9972](https://issues.apache.org/jira/browse/CB-9972) - Remove **iOS** whitelist
51 | * Updated the text, it should read 4.0.x and greater, since this plugin will be required for `cordova-android 5.0`
52 | * Fixing contribute link.
53 | * Updated `plugin.xml ` tag to remove warning about not needing this plugin if you are using the **iOS 9 SDK**
54 | * [CB-9738](https://issues.apache.org/jira/browse/CB-9738) - Disable whitelist use when runtime environment is **iOS 9**
55 | * [CB-9740](https://issues.apache.org/jira/browse/CB-9740) - Add `` tag describing whitelist plugin not needed on `cordova-ios` and cordova-android 3.x`
56 | * [CB-9568](https://issues.apache.org/jira/browse/CB-9568) - Update whitelist plugin to allow all network access by default
57 | * [CB-9337](https://issues.apache.org/jira/browse/CB-9337) - enable use of `` tags for native code network requests
58 |
59 | ### 1.1.0 (Jun 17, 2015)
60 | * [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-whitelist documentation translation: cordova-plugin-whitelist
61 | * fix npm md issue
62 | * Usage of CDVURLRequestFilter protocol.
63 | * [CB-9089](https://issues.apache.org/jira/browse/CB-9089) - iOS whitelist plugin does not compile
64 | * [CB-9090](https://issues.apache.org/jira/browse/CB-9090) - Enable whitelist plugin for cordova-ios 4.0.0
65 | * Fixed error in Content-Security-Policy example
66 |
67 | ### 1.0.0 (Mar 25, 2015)
68 | * [CB-8739](https://issues.apache.org/jira/browse/CB-8739) added missing license headers
69 | * Add @Override to CustomConfigXmlParser methods
70 | * Change ID to cordova-plugin-whitelist rather than reverse-DNS-style
71 | * Tweak CSP examples in README
72 | * [CB-8660](https://issues.apache.org/jira/browse/CB-8660) remove extra commas from package.json
73 |
--------------------------------------------------------------------------------
/www/css/index.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | * {
20 | -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
21 | }
22 |
23 | body {
24 | -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
25 | -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
26 | -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
27 | background-color:#E4E4E4;
28 | background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
29 | background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
30 | background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
31 | background-image:-webkit-gradient(
32 | linear,
33 | left top,
34 | left bottom,
35 | color-stop(0, #A7A7A7),
36 | color-stop(0.51, #E4E4E4)
37 | );
38 | background-attachment:fixed;
39 | font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
40 | font-size:12px;
41 | height:100%;
42 | margin:0px;
43 | padding:0px;
44 | text-transform:uppercase;
45 | width:100%;
46 | }
47 |
48 | /* Portrait layout (default) */
49 | .app {
50 | background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
51 | position:absolute; /* position in the center of the screen */
52 | left:50%;
53 | top:50%;
54 | height:50px; /* text area height */
55 | width:225px; /* text area width */
56 | text-align:center;
57 | padding:180px 0px 0px 0px; /* image height is 200px (bottom 20px are overlapped with text) */
58 | margin:-115px 0px 0px -112px; /* offset vertical: half of image height and text area height */
59 | /* offset horizontal: half of text area width */
60 | }
61 |
62 | /* Landscape layout (with min-width) */
63 | @media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
64 | .app {
65 | background-position:left center;
66 | padding:75px 0px 75px 170px; /* padding-top + padding-bottom + text area = image height */
67 | margin:-90px 0px 0px -198px; /* offset vertical: half of image height */
68 | /* offset horizontal: half of image width and text area width */
69 | }
70 | }
71 |
72 | h1 {
73 | font-size:24px;
74 | font-weight:normal;
75 | margin:0px;
76 | overflow:visible;
77 | padding:0px;
78 | text-align:center;
79 | }
80 |
81 | .event {
82 | border-radius:4px;
83 | -webkit-border-radius:4px;
84 | color:#FFFFFF;
85 | font-size:12px;
86 | margin:0px 30px;
87 | padding:2px 0px;
88 | }
89 |
90 | .event.listening {
91 | background-color:#333333;
92 | display:block;
93 | }
94 |
95 | .event.received {
96 | background-color:#4B946A;
97 | display:none;
98 | }
99 |
100 | @keyframes fade {
101 | from { opacity: 1.0; }
102 | 50% { opacity: 0.4; }
103 | to { opacity: 1.0; }
104 | }
105 |
106 | @-webkit-keyframes fade {
107 | from { opacity: 1.0; }
108 | 50% { opacity: 0.4; }
109 | to { opacity: 1.0; }
110 | }
111 |
112 | .blink {
113 | animation:fade 3000ms infinite;
114 | -webkit-animation:fade 3000ms infinite;
115 | }
116 |
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/doc/zh/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # cordova-plugin-whitelist
21 |
22 | 這個外掛程式實現一個用於導航在科爾多瓦 4.0 應用程式 web 視圖的白名單策略
23 |
24 | ## 支援的科爾多瓦平臺
25 |
26 | * Android 4.0.0 或以上
27 | * iOS 4.0.0 或以上
28 |
29 | ## 導航白名單
30 |
31 | 控制 web 視圖本身可以導航到的 Url。適用于頂級導航只。
32 |
33 | 怪癖: 在 Android 上它也適用于 iframe 的非-結計畫。
34 |
35 | 預設情況下,只有到`file://` Url 導航允許。若要允許其他其他 Url,必須將``標籤添加到您的`config.xml`:
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ## 科爾多瓦-外掛程式-白名單
56 |
57 | 控制應用程式允許讓系統打開的 Url。 預設情況下,沒有外部 Url 允許。
58 |
59 | 在 android 系統,這相當於發送類型 BROWSEABLE 的意圖。
60 |
61 | 此白名單並不適用于只超連結和對`window.open ()`調用的外掛程式.
62 |
63 | 在`config.xml`中添加``標籤,像這樣:
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 |
89 |
90 | ## 網路請求白名單
91 |
92 | 網路請求的控制項 (圖像,XHRs 等) 允許 (通過科爾多瓦本機掛鉤)。
93 |
94 | 注意: 我們建議你使用內容的安全性原則 (見下文),這是更安全。 此白名單大多是為 webviews 不支援 CSP 的歷史。
95 |
96 | 在`config.xml`中添加``標記,像這樣:
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | 沒有任何``標籤,只到`file://` Url 允許請求。 但是,預設的科爾多瓦應用程式包括`` ,預設情況。
116 |
117 | 怪癖: Android 還允許對 HTTPs://ssl.gstatic.com/accessibility/javascript/android/ 請求預設情況下,因為這是對講正常所需。
118 |
119 | ### 內容安全政策
120 |
121 | 網路請求的控制項 (圖像,XHRs 等) 允許 (通過 web 視圖直接)。
122 |
123 | 對 Android 和 iOS,網路請求白名單 (見上文) 是不能夠過濾所有類型的請求 (例如`` & Websocket 未被阻止)。 那麼,除了白名單中,你應使用[內容安全性原則](http://content-security-policy.com/) `< 元 >`標記您的所有頁面。
124 |
125 | 在 android 系統,對 CSP 系統 web 視圖的支援開始奇巧 (但是是上使用 web 視圖人行橫道上的所有版本可用)。
126 |
127 | 下面是一些示例 CSP 聲明為`.html`頁面:
128 |
129 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/doc/ko/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # cordova-plugin-whitelist
21 |
22 | 이 플러그인 구현 코르도바 4.0 응용 프로그램 webview를 탐색에 대 한 허용 정책
23 |
24 | ## 지원된 코르도바 플랫폼
25 |
26 | * 안 드 로이드 4.0.0 이상
27 | * iOS 4.0.0 이상
28 |
29 | ## 탐색 허용
30 |
31 | WebView 자체가 탐색할 수 있는 Url을 제어 합니다. 최상위 탐색에만 적용 됩니다.
32 |
33 | 단점: 안 드 로이드에도 적용 됩니다 iframe에 대 한 비-프로토콜인 계획.
34 |
35 | 기본적으로 탐색 `file://` Url에만 사용할 수 있습니다. 다른 다른 Url을 허용 하려면 `config.xml`에 `< allow-navigation >` 태그를 추가 해야 합니다.
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ## 의도 허용
56 |
57 | App 시스템 열을 게 허용 되는 Url을 제어 합니다. 기본적으로 외부 Url은 사용할 수 있습니다.
58 |
59 | 안 드 로이드에이 형식의 BROWSEABLE 의도 보내는 것 같습니다.
60 |
61 | 이 허용 된 플러그인, 하이퍼링크 및 `window.open ()` 호출에 적용 되지 않습니다..
62 |
63 | `Config.xml`에이 같은 `< allow-intent >` 태그를 추가 합니다.
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 |
89 |
90 | ## 네트워크 요청 허용
91 |
92 | 요청을 네트워크 컨트롤 (이미지, XHRs, 등) (코르도바 네이티브 후크)를 통해 할 수 있습니다.
93 |
94 | 참고: 당신이 사용 콘텐츠 보안 정책 (아래 참조), 더 안전한 것이 좋습니다. 이 허용은 CSP를 지원 하지 않는 webviews에 대 한 역사적.
95 |
96 | `Config.xml`에이 같은 `< access >` 태그를 추가 합니다.
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | 어떤 `< access >` 태그 없이 요청 `file://` Url 사용할 수 있습니다. 그러나 기본 코르도바 응용 프로그램을 포함 하는, `< access origin="*" >` 기본적으로.
116 |
117 | 특질: 안 드 로이드 또한 수 있습니다 요청을 https://ssl.gstatic.com/accessibility/javascript/android/ 기본적으로 필요 제대로 작동 하려면 의견 이므로.
118 |
119 | ### 콘텐츠 보안 정책
120 |
121 | 요청을 네트워크 컨트롤 (이미지, XHRs, 등) (webview 직접)를 통해 할 수 있습니다.
122 |
123 | 안 드 로이드와 iOS에 네트워크 요청 허용 (위 참조)는 모든 종류의 요청 (예: `< 비디오 >` & WebSockets 차단 되지 않습니다)를 필터링 할 수 없습니다. 그래서, 허용, 뿐만 아니라 귀하의 모든 페이지에 [콘텐츠 보안 정책](http://content-security-policy.com/) `< meta >` 태그를 사용 해야 합니다.
124 |
125 | 안 드 로이드, 시스템 webview 내에서 CSP에 대 한 지원을 KitKat 시작 (하지만 횡단 보도 WebView를 사용 하 여 모든 버전에서 사용할 수).
126 |
127 | 다음은 `.html` 페이지에 대 한 몇 가지 예제 CSP 선언입니다.
128 |
129 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/doc/ja/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # cordova-plugin-whitelist
21 |
22 | このプラグイン実装コルドバ 4.0 アプリケーション webview をナビゲートするためのホワイト リスト ポリシー
23 |
24 | ## サポートされているコルドバのプラットフォーム
25 |
26 | * アンドロイド 4.0.0 以上
27 | * iOS 4.0.0 以上
28 |
29 | ## ナビゲーションのホワイト リスト
30 |
31 | WebView 自体に移動に Url を制御します。最上位ナビゲーションのみに適用されます。
32 |
33 | 癖: Android にもに適用されますの iframe 非-[http スキーム。
34 |
35 | 既定では、ナビゲーション、 `file://`の Url にのみ許可されます。その他の他の Url を許可するように、 `config.xml`に``タグを追加する必要があります。
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ## インテントのホワイト リスト
56 |
57 | どの Url を開くようにシステムを聞いて、アプリに許可を制御します。 既定では、外部 Url 許可されません。
58 |
59 | 人造人間、これは型 BROWSEABLE の意図を送信することに相当します。
60 |
61 | このホワイト リストはプラグインのみハイパーリンクおよび`window.open()`への呼び出しには適用されません。.
62 |
63 | `Config.xml`内の``タグは、このようなを追加します。
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 |
89 |
90 | ## ネットワーク要求のホワイト リスト
91 |
92 | ネットワーク要求コントロール (画像、XHRs 等) (コルドバ ネイティブ フック) を介して行われることが。
93 |
94 | 注: より安全なコンテンツ セキュリティ ポリシー (下記参照) を使用してお勧めします。 このホワイト リストほとんどの CSP をサポートしていない web 表示のために歴史的です。
95 |
96 | `Config.xml`内のこのような``タグを追加します。
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | ``タグ、なし`file://` Url に要求のみを許可します。 ただし、既定のコルドバ アプリケーションが含まれています``デフォルトで。
116 |
117 | 気まぐれ: アンドロイドも要求できます https://ssl.gstatic.com/accessibility/javascript/android/デフォルトでは、トークが正常に機能するために必要ですので。
118 |
119 | ### コンテンツのセキュリティ ポリシー
120 |
121 | ネットワーク要求コントロール (画像、XHRs 等) (直接 webview) を介して行われることが。
122 |
123 | Android と iOS は、ネットワーク要求ホワイト リスト (上記参照) はすべての種類の要求 (例: `< ビデオ >` & Websocket がふさがれていない) をフィルター処理できません。 だから、ホワイト リストに加えてすべてのページに[コンテンツ セキュリティ ポリシー](http://content-security-policy.com/) `< meta >`タグを使用する必要があります。
124 |
125 | Android 上システム webview 内 CSP サポート キットカットから始まります (しかし横断歩道 WebView を使用してすべてのバージョンで利用可能です)。
126 |
127 | `.Html`ページのいくつかの例 CSP の宣言は次のとおりです。
128 |
129 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/src/android/WhitelistPlugin.java:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | package org.apache.cordova.whitelist;
21 |
22 | import org.apache.cordova.CordovaPlugin;
23 | import org.apache.cordova.ConfigXmlParser;
24 | import org.apache.cordova.LOG;
25 | import org.apache.cordova.Whitelist;
26 | import org.xmlpull.v1.XmlPullParser;
27 |
28 | import android.content.Context;
29 |
30 | public class WhitelistPlugin extends CordovaPlugin {
31 | private static final String LOG_TAG = "WhitelistPlugin";
32 | private Whitelist allowedNavigations;
33 | private Whitelist allowedIntents;
34 | private Whitelist allowedRequests;
35 |
36 | // Used when instantiated via reflection by PluginManager
37 | public WhitelistPlugin() {
38 | }
39 | // These can be used by embedders to allow Java-configuration of whitelists.
40 | public WhitelistPlugin(Context context) {
41 | this(new Whitelist(), new Whitelist(), null);
42 | new CustomConfigXmlParser().parse(context);
43 | }
44 | public WhitelistPlugin(XmlPullParser xmlParser) {
45 | this(new Whitelist(), new Whitelist(), null);
46 | new CustomConfigXmlParser().parse(xmlParser);
47 | }
48 | public WhitelistPlugin(Whitelist allowedNavigations, Whitelist allowedIntents, Whitelist allowedRequests) {
49 | if (allowedRequests == null) {
50 | allowedRequests = new Whitelist();
51 | allowedRequests.addWhiteListEntry("file:///*", false);
52 | allowedRequests.addWhiteListEntry("data:*", false);
53 | }
54 | this.allowedNavigations = allowedNavigations;
55 | this.allowedIntents = allowedIntents;
56 | this.allowedRequests = allowedRequests;
57 | }
58 | @Override
59 | public void pluginInitialize() {
60 | if (allowedNavigations == null) {
61 | allowedNavigations = new Whitelist();
62 | allowedIntents = new Whitelist();
63 | allowedRequests = new Whitelist();
64 | new CustomConfigXmlParser().parse(webView.getContext());
65 | }
66 | }
67 |
68 | private class CustomConfigXmlParser extends ConfigXmlParser {
69 | @Override
70 | public void handleStartTag(XmlPullParser xml) {
71 | String strNode = xml.getName();
72 | if (strNode.equals("content")) {
73 | String startPage = xml.getAttributeValue(null, "src");
74 | allowedNavigations.addWhiteListEntry(startPage, false);
75 | } else if (strNode.equals("allow-navigation")) {
76 | String origin = xml.getAttributeValue(null, "href");
77 | if ("*".equals(origin)) {
78 | allowedNavigations.addWhiteListEntry("http://*/*", false);
79 | allowedNavigations.addWhiteListEntry("https://*/*", false);
80 | allowedNavigations.addWhiteListEntry("data:*", false);
81 | } else {
82 | allowedNavigations.addWhiteListEntry(origin, false);
83 | }
84 | } else if (strNode.equals("allow-intent")) {
85 | String origin = xml.getAttributeValue(null, "href");
86 | allowedIntents.addWhiteListEntry(origin, false);
87 | } else if (strNode.equals("access")) {
88 | String origin = xml.getAttributeValue(null, "origin");
89 | String subdomains = xml.getAttributeValue(null, "subdomains");
90 | boolean external = (xml.getAttributeValue(null, "launch-external") != null);
91 | if (origin != null) {
92 | if (external) {
93 | LOG.w(LOG_TAG, "Found within config.xml. Please use instead.");
94 | allowedIntents.addWhiteListEntry(origin, (subdomains != null) && (subdomains.compareToIgnoreCase("true") == 0));
95 | } else {
96 | if ("*".equals(origin)) {
97 | allowedRequests.addWhiteListEntry("http://*/*", false);
98 | allowedRequests.addWhiteListEntry("https://*/*", false);
99 | } else {
100 | allowedRequests.addWhiteListEntry(origin, (subdomains != null) && (subdomains.compareToIgnoreCase("true") == 0));
101 | }
102 | }
103 | }
104 | }
105 | }
106 | @Override
107 | public void handleEndTag(XmlPullParser xml) {
108 | }
109 | }
110 |
111 | @Override
112 | public Boolean shouldAllowNavigation(String url) {
113 | if (allowedNavigations.isUrlWhiteListed(url)) {
114 | return true;
115 | }
116 | return null; // Default policy
117 | }
118 |
119 | @Override
120 | public Boolean shouldAllowRequest(String url) {
121 | if (Boolean.TRUE == shouldAllowNavigation(url)) {
122 | return true;
123 | }
124 | if (allowedRequests.isUrlWhiteListed(url)) {
125 | return true;
126 | }
127 | return null; // Default policy
128 | }
129 |
130 | @Override
131 | public Boolean shouldOpenExternalUrl(String url) {
132 | if (allowedIntents.isUrlWhiteListed(url)) {
133 | return true;
134 | }
135 | return null; // Default policy
136 | }
137 |
138 | public Whitelist getAllowedNavigations() {
139 | return allowedNavigations;
140 | }
141 |
142 | public void setAllowedNavigations(Whitelist allowedNavigations) {
143 | this.allowedNavigations = allowedNavigations;
144 | }
145 |
146 | public Whitelist getAllowedIntents() {
147 | return allowedIntents;
148 | }
149 |
150 | public void setAllowedIntents(Whitelist allowedIntents) {
151 | this.allowedIntents = allowedIntents;
152 | }
153 |
154 | public Whitelist getAllowedRequests() {
155 | return allowedRequests;
156 | }
157 |
158 | public void setAllowedRequests(Whitelist allowedRequests) {
159 | this.allowedRequests = allowedRequests;
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/resources/lang/en/validation.php:
--------------------------------------------------------------------------------
1 | 'The :attribute must be accepted.',
17 | 'active_url' => 'The :attribute is not a valid URL.',
18 | 'after' => 'The :attribute must be a date after :date.',
19 | 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
20 | 'alpha' => 'The :attribute may only contain letters.',
21 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
22 | 'alpha_num' => 'The :attribute may only contain letters and numbers.',
23 | 'array' => 'The :attribute must be an array.',
24 | 'before' => 'The :attribute must be a date before :date.',
25 | 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
26 | 'between' => [
27 | 'numeric' => 'The :attribute must be between :min and :max.',
28 | 'file' => 'The :attribute must be between :min and :max kilobytes.',
29 | 'string' => 'The :attribute must be between :min and :max characters.',
30 | 'array' => 'The :attribute must have between :min and :max items.',
31 | ],
32 | 'boolean' => 'The :attribute field must be true or false.',
33 | 'confirmed' => 'The :attribute confirmation does not match.',
34 | 'date' => 'The :attribute is not a valid date.',
35 | 'date_format' => 'The :attribute does not match the format :format.',
36 | 'different' => 'The :attribute and :other must be different.',
37 | 'digits' => 'The :attribute must be :digits digits.',
38 | 'digits_between' => 'The :attribute must be between :min and :max digits.',
39 | 'dimensions' => 'The :attribute has invalid image dimensions.',
40 | 'distinct' => 'The :attribute field has a duplicate value.',
41 | 'email' => 'The :attribute must be a valid email address.',
42 | 'exists' => 'The selected :attribute is invalid.',
43 | 'file' => 'The :attribute must be a file.',
44 | 'filled' => 'The :attribute field must have a value.',
45 | 'image' => 'The :attribute must be an image.',
46 | 'in' => 'The selected :attribute is invalid.',
47 | 'in_array' => 'The :attribute field does not exist in :other.',
48 | 'integer' => 'The :attribute must be an integer.',
49 | 'ip' => 'The :attribute must be a valid IP address.',
50 | 'ipv4' => 'The :attribute must be a valid IPv4 address.',
51 | 'ipv6' => 'The :attribute must be a valid IPv6 address.',
52 | 'json' => 'The :attribute must be a valid JSON string.',
53 | 'max' => [
54 | 'numeric' => 'The :attribute may not be greater than :max.',
55 | 'file' => 'The :attribute may not be greater than :max kilobytes.',
56 | 'string' => 'The :attribute may not be greater than :max characters.',
57 | 'array' => 'The :attribute may not have more than :max items.',
58 | ],
59 | 'mimes' => 'The :attribute must be a file of type: :values.',
60 | 'mimetypes' => 'The :attribute must be a file of type: :values.',
61 | 'min' => [
62 | 'numeric' => 'The :attribute must be at least :min.',
63 | 'file' => 'The :attribute must be at least :min kilobytes.',
64 | 'string' => 'The :attribute must be at least :min characters.',
65 | 'array' => 'The :attribute must have at least :min items.',
66 | ],
67 | 'not_in' => 'The selected :attribute is invalid.',
68 | 'numeric' => 'The :attribute must be a number.',
69 | 'present' => 'The :attribute field must be present.',
70 | 'regex' => 'The :attribute format is invalid.',
71 | 'required' => 'The :attribute field is required.',
72 | 'required_if' => 'The :attribute field is required when :other is :value.',
73 | 'required_unless' => 'The :attribute field is required unless :other is in :values.',
74 | 'required_with' => 'The :attribute field is required when :values is present.',
75 | 'required_with_all' => 'The :attribute field is required when :values is present.',
76 | 'required_without' => 'The :attribute field is required when :values is not present.',
77 | 'required_without_all' => 'The :attribute field is required when none of :values are present.',
78 | 'same' => 'The :attribute and :other must match.',
79 | 'size' => [
80 | 'numeric' => 'The :attribute must be :size.',
81 | 'file' => 'The :attribute must be :size kilobytes.',
82 | 'string' => 'The :attribute must be :size characters.',
83 | 'array' => 'The :attribute must contain :size items.',
84 | ],
85 | 'string' => 'The :attribute must be a string.',
86 | 'timezone' => 'The :attribute must be a valid zone.',
87 | 'unique' => 'The :attribute has already been taken.',
88 | 'uploaded' => 'The :attribute failed to upload.',
89 | 'url' => 'The :attribute format is invalid.',
90 |
91 | /*
92 | |--------------------------------------------------------------------------
93 | | Custom Validation Language Lines
94 | |--------------------------------------------------------------------------
95 | |
96 | | Here you may specify custom validation messages for attributes using the
97 | | convention "attribute.rule" to name the lines. This makes it quick to
98 | | specify a specific custom language line for a given attribute rule.
99 | |
100 | */
101 |
102 | 'custom' => [
103 | 'attribute-name' => [
104 | 'rule-name' => 'custom-message',
105 | ],
106 | ],
107 |
108 | /*
109 | |--------------------------------------------------------------------------
110 | | Custom Validation Attributes
111 | |--------------------------------------------------------------------------
112 | |
113 | | The following language lines are used to swap attribute place-holders
114 | | with something more reader friendly such as E-Mail Address instead
115 | | of "email". This simply helps us make messages a little cleaner.
116 | |
117 | */
118 |
119 | 'attributes' => [],
120 |
121 | ];
122 |
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/doc/pl/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # cordova-plugin-whitelist
21 |
22 | Ten plugin wdraża polityki białej nawigacja widoku sieci Web aplikacji na Cordova 4.0
23 |
24 | ## Cordova obsługiwanych platform
25 |
26 | * Android 4.0.0 lub powyżej
27 | * iOS 4.0.0 lub powyżej
28 |
29 | ## Biała lista nawigacji
30 |
31 | Kontroluje, których adresy URL widoku sieci Web, samej można nawigować do. Dotyczy tylko najwyższego poziomu nawigacje.
32 |
33 | Dziwactwa: na Android to dotyczy także IFRAME do nie-http (s) systemów.
34 |
35 | Domyślnie, nawigacje tylko do URLi `file://` , są dozwolone. Aby zezwolić na inne adresy URL, należy dodać Tagi `< allow-navigation >` do pliku `config.xml`:
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ## Zamiarem biała
56 |
57 | Kontroluje, których adresy URL aplikacji jest możliwość zapytać systemem otwierania. Domyślnie nie ma zewnętrznych adresów URL są dozwolone.
58 |
59 | Na Android to przyrównuje do wysyłania zamiarem typu BROWSEABLE.
60 |
61 | Ta biała nie ma zastosowania do pluginów, tylko hiperłącza i wywołania `window.open()`.
62 |
63 | W `pliku config.xml`dodawanie tagów `< allow-intent >` , jak to:
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 |
89 |
90 | ## Sieci wniosek biała
91 |
92 | Formanty, które sieci żądań (obrazy, XHRs, itp.) mogą być wykonane (za pośrednictwem cordova rodzimych haki).
93 |
94 | Uwaga: Zalecamy, że używasz treści polityki bezpieczeństwa (patrz poniżej), który jest bardziej bezpieczne. Ta Biała jest głównie historyczne dla webviews, które nie obsługują CSP.
95 |
96 | W `pliku config.xml`dodawanie tagów `< access >` , jak to:
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | Bez żadnych tagów `< access >` dozwolone są tylko żądania do URLi `file://` . Jednak domyślnie Cordova aplikacja zawiera `< access origin = "*" >` domyślnie.
116 |
117 | Cokół: Android pozwala również żądania do https://ssl.gstatic.com/accessibility/javascript/android/ domyślnie, ponieważ jest to wymagane dla TalkBack wobec funkcja poprawnie.
118 |
119 | ### Zasady zabezpieczeń zawartości
120 |
121 | Formanty, które sieci żądań (obrazy, XHRs, itp.) mogą być wykonane (za pomocą widoku sieci Web bezpośrednio).
122 |
123 | Na Androida i iOS biała żądanie sieci (patrz wyżej) nie jest w stanie filtrować wszystkie rodzaje wniosków (np. `< video >` & WebSockets nie są zablokowane). Tak oprócz białej listy, należy użyć tagu `< meta >` [Treści polityki bezpieczeństwa](http://content-security-policy.com/) na wszystkich stronach.
124 |
125 | Na Android wsparcie dla CSP w ramach systemu widoku sieci Web zaczyna KitKat (ale jest dostępne we wszystkich wersjach przy użyciu widoku sieci Web przejście dla pieszych).
126 |
127 | Oto niektóre przykład CSP deklaracje dla strony `HTML` :
128 |
129 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/doc/de/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # cordova-plugin-whitelist
21 |
22 | Dieses Plugin implementiert eine Whitelist-Politik für die Navigation in der Anwendung Webview Cordova 4.0
23 |
24 | ## Cordova unterstützte Plattformen
25 |
26 | * Android 4.0.0 oder höher
27 | * iOS 4.0.0 oder höher
28 |
29 | ## Navigation-Whitelist
30 |
31 | Steuert, welche URLs die WebView selbst zu navigiert werden kann. Bezieht sich auf der obersten Ebene Navigationen nur.
32 |
33 | Macken: auf Android es gilt auch für Iframes für nicht-http(s) Systeme.
34 |
35 | In der Standardeinstellung Navigationen nur auf `file://` URLs, sind zulässig. Wenn andere andere URLs zulassen möchten, müssen Sie Ihre `"config.xml"` `` Markierungen hinzufügen:
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ## Vorsatz-Whitelist
56 |
57 | Steuert, welche URLs die app zulässig ist, um das System zu öffnen Fragen. Standardmäßig dürfen keine externe URLs.
58 |
59 | Das entspricht auf Android eine Absicht des Typs BROWSEABLE senden.
60 |
61 | Diese Whitelist gilt nicht für Plugins, nur Hyperlinks und Aufrufe von `window.open()`.
62 |
63 | Fügen Sie in `"config.xml"` `` Tags hinzu, wie folgt:
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 |
89 |
90 | ## Netzwerk-Anforderung-Whitelist
91 |
92 | Steuert, welche-Anforderungen Netzwerk (Bilder, XHRs, etc.) dürfen (über Cordova native Haken) erfolgen.
93 |
94 | Hinweis: Wir empfehlen Ihnen eine Content Security Policy (siehe unten), das ist sicherer. Diese Whitelist ist vor allem historisch für Webansichten für die CSP nicht unterstützen.
95 |
96 | Fügen Sie in `"config.xml"` `` Tags hinzu, wie folgt:
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | Ohne `` -Tags dürfen nur Anforderungen an `file://` URLs. Enthält jedoch die Standardanwendung Cordova `` standardmäßig.
116 |
117 | Eigenart: Android kann auch Anforderungen an https://ssl.gstatic.com/accessibility/javascript/android/ standardmäßig, da dies für TalkBack ordnungsgemäß erforderlich ist.
118 |
119 | ### Content-Security-Policy
120 |
121 | Steuert, welche-Anforderungen Netzwerk (Bilder, XHRs, etc.) dürfen (über Webview direkt) erfolgen.
122 |
123 | Auf Android und iOS ist die Netzwerk Anfrage Whitelist (s.o.) nicht in der Lage, alle Arten von Anfragen (z.B. `< video >` & WebSockets nicht blockiert) filtern. Also, sollten Sie neben der Whitelist, [Content Security Policy](http://content-security-policy.com/) `< Meta >` -Tags auf allen Ihren Seiten verwenden.
124 |
125 | Auf Android Unterstützung für CSP innerhalb der System-Webview beginnt mit KitKat (aber ist in allen Versionen mit Crosswalk WebView verfügbar).
126 |
127 | Hier sind einige Beispiel-CSP-Deklarationen für Ihre `HTML` -Seiten:
128 |
129 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/doc/it/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # cordova-plugin-whitelist
21 |
22 | Questo plugin attua una politica di whitelist per spostarsi all'interno dell'applicazione webview in Cordova 4.0
23 |
24 | ## Piattaforme supportate Cordova
25 |
26 | * Android 4.0.0 o superiore
27 | * iOS 4.0.0 o superiore
28 |
29 | ## Navigazione Whitelist
30 |
31 | Controlla quali URL WebView stessa può essere esplorato. Si applica al solo primo livello navigazioni.
32 |
33 | Stranezze: su Android vale anche per gli iframe per non-schemi di http (s).
34 |
35 | Per impostazione predefinita, navigazioni solo agli URL `file://` , sono ammessi. Per consentire altri altri URL, è necessario aggiungere `` tag per il tuo `config. XML`:
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ## Whitelist intento
56 |
57 | Controlla quali URL app è consentito richiedere il sistema di apertura. Per impostazione predefinita, nessun esterno URL sono ammessi.
58 |
59 | Su Android, ciò equivale all'invio di un intento di tipo BROWSEABLE.
60 |
61 | Questa whitelist non si applica ai plugin, solo i collegamenti ipertestuali e chiamate a `Window`.
62 |
63 | In `config. XML`, aggiungere tag `` , simile al seguente:
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 |
89 |
90 | ## Rete richiesta Whitelist
91 |
92 | Controlli che le richieste di rete (immagini, XHRs, ecc.) sono consentiti (tramite ganci nativo di cordova).
93 |
94 | Nota: Si consiglia di che utilizzare un criterio di protezione contenuti (Vedi sotto), che è più sicuro. La whitelist è principalmente storico per visualizzazioni Web che non supportano la CSP.
95 |
96 | In `config. XML`, aggiungere tag `< access >` , simile al seguente:
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | Senza qualsiasi tag `< access >` , sono consentite solo le richieste di URL `file://` . Tuttavia, l'applicazione di Cordova predefinito include `< access origin = "*" >` per impostazione predefinita.
116 |
117 | Stranezza: Android consente anche alle richieste di https://ssl.gstatic.com/accessibility/javascript/android/ per impostazione predefinita, poiché questa operazione è necessaria per TalkBack funzionare correttamente.
118 |
119 | ### Politica di sicurezza del contenuto
120 |
121 | Controlli che le richieste di rete (immagini, XHRs, ecc.) possono essere effettuate (via webview direttamente).
122 |
123 | Su Android e iOS, la rete richiesta whitelist (Vedi sopra) non è in grado di filtrare tutti i tipi di richieste (ad esempio non sono bloccate `< video >` & WebSockets). Così, oltre alla whitelist, è necessario utilizzare un tag `< meta >` [Content Security Policy](http://content-security-policy.com/) su tutte le pagine.
124 |
125 | Su Android, supporto per CSP all'interno webview sistema inizia con KitKat (ma è disponibile su tutte le versioni usando Crosswalk WebView).
126 |
127 | Ecco alcuni esempi di dichiarazioni di CSP per le pagine `HTML` :
128 |
129 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/doc/es/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # cordova-plugin-whitelist
21 |
22 | Este plugin implementa una política de lista blanca para navegar la aplicación webview en Cordova 4.0
23 |
24 | ## Plataformas soportadas Cordova
25 |
26 | * Android 4.0 o superior
27 | * iOS 4.0.0 o superior
28 |
29 | ## Lista blanca de navegación
30 |
31 | Controla que las URLs del WebView se puede navegar a. Se aplica a nivel superior navegaciones solo.
32 |
33 | Peculiaridades: en Android también se aplica a iframes para esquemas que son de http (s).
34 |
35 | Por defecto, navegaciones solo a direcciones URL `file://` , son permitidas. Para permitir que otros otras URL, debe agregar `< allow-navegación >` etiquetas en el `archivo config.xml`:
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ## Intención de lista blanca
56 |
57 | Controla qué URLs de la aplicación se permite hacer el sistema para abrir. De forma predeterminada, se permiten ninguÌ n external URLs.
58 |
59 | En Android, esto equivale a enviar una intención de tipo BROWSEABLE.
60 |
61 | Esta lista blanca no se aplica a plugins, sólo los hipervínculos y las llamadas a `window.Open)`.
62 |
63 | En `config.xml`, agregar etiquetas `< allow-intent >` , como este:
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 |
89 |
90 | ## Solicitud de red blanca
91 |
92 | Controles que las peticiones de la red (imágenes, XHRs, etc.) se les permite hacer (a través de ganchos nativa de Córdoba).
93 |
94 | Nota: Le sugerimos que utilice una política de seguridad de contenido (véase abajo), que es más seguro. Esta lista blanca es sobre todo histórico para webviews que no admiten la CSP.
95 |
96 | En `config.xml`, agregue etiquetas de `< access >` , como este:
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | Sin las etiquetas `< access >` , se admiten sólo las solicitudes a direcciones URL `file://` . Sin embargo, la aplicación por defecto de Cordova incluye `< access origin = "*" >` por defecto.
116 |
117 | Quirk: Android también permite las solicitudes de https://ssl.gstatic.com/accessibility/javascript/android/ por defecto, puesto que es necesario para TalkBack funcionar correctamente.
118 |
119 | ### Política de seguridad de contenido
120 |
121 | Controles que las peticiones de la red (imágenes, XHRs, etc.) se les permite hacer (vía webview directamente).
122 |
123 | En iOS y Android, la red solicitud lista blanca (véase arriba) no es capaz de filtrar todos los tipos de solicitudes (por ejemplo, `< video >` y WebSockets no estén bloqueadas). Así, además de la lista blanca, usted debe utilizar una etiqueta `< meta >` de [Contenido la política de seguridad](http://content-security-policy.com/) en todas las páginas.
124 |
125 | En Android, soporte para CSP en el sistema webview comienza con KitKat (pero está disponible en todas las versiones con WebView de paso de peatones).
126 |
127 | Aquí están algunas declaraciones de CSP de ejemplo para las páginas `.html` :
128 |
129 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/doc/fr/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # cordova-plugin-whitelist
21 |
22 | Ce plugin met en œuvre une politique de liste blanche pour naviguer le webview application sur Cordova 4.0
23 |
24 | ## Plates-formes prises en charge Cordova
25 |
26 | * 4.0.0 Android ou supérieur
27 | * iOS 4.0.0 ou supérieur
28 |
29 | ## Navigation liste blanche
30 |
31 | Contrôle quels URL le WebView lui-même peut être parcourus à. S'applique à des navigations niveau supérieur seulement.
32 |
33 | Particularités : sur Android il s'applique également aux iframes pour non-schémas http (s).
34 |
35 | Par défaut, navigations qu'aux URL `file://` , sont autorisés. Pour permettre aux autres d'autres URL, vous devez ajouter des balises `` à votre `fichier config.xml`:
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ## Intent Whitelist
56 |
57 | Contrôle quels URL l'app n'est autorisé à poser le système d'ouverture. Par défaut, aucun external URL est autorisés.
58 |
59 | Sur Android, cela équivaut à envoyer une intention de type BROWSEABLE.
60 |
61 | Cette autorisation ne s'applique pas aux plugins, uniquement les liens hypertexte et les appels à `window.open()`.
62 |
63 | Dans le `fichier config.xml`, ajouter des balises `` , comme ceci :
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 |
89 |
90 | ## Réseau demande liste blanche
91 |
92 | Les contrôles dont les demandes de réseau (images, XHRs, etc.) sont autorisés à effectuer (via cordova natif crochets).
93 |
94 | Remarque : Nous vous suggérons de qu'utiliser un contenu politique de sécurité (voir ci-dessous), qui est plus sûr. Cette liste blanche est surtout historique pour webviews qui ne prennent pas en charge les CSP.
95 |
96 | Dans le `fichier config.xml`, ajouter des balises `` , comme ceci :
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | Sans les balises `` , seules les demandes d'URL `file://` sont autorisés. Toutefois, l'application de Cordoue par défaut inclut `` par défaut.
116 |
117 | Bizarrerie : Android permet également aux requêtes à https://ssl.gstatic.com/accessibility/javascript/android/ par défaut, puisque c'est nécessaire pour TalkBack fonctionner correctement.
118 |
119 | ### Politique de sécurité du contenu
120 |
121 | Les contrôles dont les demandes de réseau (images, XHRs, etc.) sont autorisés à effectuer (via webview directement).
122 |
123 | Sur Android et iOS, la réseau demande liste blanche (voir ci-dessus) n'est pas en mesure de filtrer tous les types de demandes (p. ex. `< video >` & WebSockets ne sont pas bloquées). Ainsi, en plus de la liste blanche, vous devez utiliser une balise `< meta >` de [Contenu politique de sécurité](http://content-security-policy.com/) sur toutes vos pages.
124 |
125 | Sur Android, support pour le CSP dans le système webview commence par KitKat (mais n'est disponible sur toutes les versions à l'aide du tableau de concordance WebView).
126 |
127 | Voici quelques exemples de déclarations de CSP pour vos pages `.html` :
128 |
129 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Whitelist
3 | description: Whitelist external content accessible by your app.
4 | ---
5 |
23 |
24 | # cordova-plugin-whitelist
25 |
26 | This plugin implements a whitelist policy for navigating the application webview on Cordova 4.0
27 |
28 | :warning: Report issues on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20Whitelist%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC)
29 |
30 | ## Installation
31 |
32 | You can install whitelist plugin with Cordova CLI, from npm:
33 |
34 | ```
35 | $ cordova plugin add cordova-plugin-whitelist
36 | $ cordova prepare
37 | ```
38 |
39 | ## Supported Cordova Platforms
40 |
41 | * Android 4.0.0 or above
42 |
43 | ## Navigation Whitelist
44 | Controls which URLs the WebView itself can be navigated to. Applies to
45 | top-level navigations only.
46 |
47 | Quirks: on Android it also applies to iframes for non-http(s) schemes.
48 |
49 | By default, navigations only to `file://` URLs, are allowed. To allow others URLs, you must add `` tags to your `config.xml`:
50 |
51 |
52 |
53 |
54 |
56 |
57 |
58 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | ## Intent Whitelist
69 | Controls which URLs the app is allowed to ask the system to open.
70 | By default, no external URLs are allowed.
71 |
72 | On Android, this equates to sending an intent of type BROWSEABLE.
73 |
74 | This whitelist does not apply to plugins, only hyperlinks and calls to `window.open()`.
75 |
76 | In `config.xml`, add `` tags, like this:
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
100 |
101 |
102 | ## Network Request Whitelist
103 | Controls which network requests (images, XHRs, etc) are allowed to be made (via cordova native hooks).
104 |
105 | Note: We suggest you use a Content Security Policy (see below), which is more secure. This whitelist is mostly historical for webviews which do not support CSP.
106 |
107 | In `config.xml`, add `` tags, like this:
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 | Without any `` tags, only requests to `file://` URLs are allowed. However, the default Cordova application includes `` by default.
126 |
127 |
128 | Note: Whitelist cannot block network redirects from a whitelisted remote website (i.e. http or https) to a non-whitelisted website. Use CSP rules to mitigate redirects to non-whitelisted websites for webviews that support CSP.
129 |
130 | Quirk: Android also allows requests to https://ssl.gstatic.com/accessibility/javascript/android/ by default, since this is required for TalkBack to function properly.
131 |
132 | ### Content Security Policy
133 | Controls which network requests (images, XHRs, etc) are allowed to be made (via webview directly).
134 |
135 | On Android and iOS, the network request whitelist (see above) is not able to filter all types of requests (e.g. `` & WebSockets are not blocked). So, in addition to the whitelist, you should use a [Content Security Policy](http://content-security-policy.com/) ` ` tag on all of your pages.
136 |
137 | On Android, support for CSP within the system webview starts with KitKat (but is available on all versions using Crosswalk WebView).
138 |
139 | Here are some example CSP declarations for your `.html` pages:
140 |
141 |
148 |
149 |
150 |
151 |
152 |
153 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
--------------------------------------------------------------------------------
/plugins/cordova-plugin-whitelist/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
--------------------------------------------------------------------------------