Commit Graph

96 Commits

Author SHA1 Message Date
Aditya Toshniwal
943fc25f60 Make the setup process more robust against aborted executions. Fixes #3830 2018-12-21 10:30:49 +00:00
Harshal Dhumal
822d384746 Purge connections from the cache on logout. Fixes #3703 2018-10-17 12:42:41 +01:00
Akshay Joshi
7144db7f5a Cleanup session files periodically. Fixes #3674 2018-10-09 11:34:13 +01:00
Aditya Toshniwal
ff87cf5544 Correctly handle "values" in web/pgadmin/__init__.py -> strip_version_number which can be None in some cases and will cause exception when None 2018-08-16 09:23:58 +01:00
Aditya Toshniwal
cb8a288f85 Added version number for URL's to ensure that files are only cached on a per-version basis. Fixes #2136. 2018-08-06 15:21:10 +05:30
Aditya Toshniwal
82d77c4608 Don't create a session when the /misc/ping test endpoint is called. Fixes #3371 2018-07-05 11:12:03 +01:00
Akshay Joshi
83f9d8a547 Minor fix to handle auto-discovery of servers with no port recorded. 2018-06-21 16:34:33 -04:00
Murtuza Zabuawala
be055ce57d Update Python and JS modules. Fixes #3154 2018-04-04 10:47:01 +01:00
Khushboo Vashi
413709fc78 Simplify cookie domain/path settings, per discussion. Instead of trying to be smart, just let the user specify them in the config, e.g.
COOKIE_DEFAULT_DOMAIN = None
SESSION_COOKIE_DOMAIN = None
2018-03-23 10:14:02 +00:00
Dave Page
c8b456d464 PEP8 fixes 2018-03-20 14:02:56 +00:00
Khushboo Vashi
4942c938ac Fix an error on exit caused by the cookie path patch. 2018-03-20 13:55:06 +00:00
Khushboo Vashi
534f1f35fe Appropriately set the cookie path. Fixes #3197 2018-03-19 17:09:19 +00:00
Dave Page
93d44d5643 Revert "Ensure the cookie domain and path are properly set. Fixes #3197"
This reverts commit 9c4edb4a28.

Jenkins really doesn't like this.
2018-03-15 14:54:14 -04:00
Khushboo Vashi
9c4edb4a28 Ensure the cookie domain and path are properly set. Fixes #3197 2018-03-15 13:59:29 -04:00
Joao Pedro De Almeida Pereira
3a6994f719 Final PEP-8 fixes 2018-03-08 09:33:43 +00:00
Harshal Dhumal
43d3e0ca64 PEP8 fixes. 2018-02-26 15:58:48 +00:00
Harshal Dhumal
e0da9c5a0c Significantly improve connection loss detection and handling in the query tool. Fixes #2815 2018-02-01 14:29:18 +01:00
Murtuza Zabuawala
393ce53d2d Fix PEP8 issues in the Tools module. Fixes #3063 2018-01-26 16:54:21 +00:00
Dave Page
89821c0d19 Update copyright notices for 2018. 2018-01-05 10:42:50 +00:00
Murtuza Zabuawala
bceb6aef3c Don't try to render security URLs in desktop mode. Fixes #2952. Fixes #2922 2017-12-18 09:15:36 +00:00
Harshal Dhumal
f3256aef71 Don't login the user with every request in desktop mode. Just do it once. Fixes #2922 2017-11-30 12:02:41 +00:00
Harshal Dhumal
35a5cf22d5 Refuse password changes (and tell the user) if the notification email cannot be sent. Fixes #2892 2017-11-30 11:16:38 +00:00
Murtuza Zabuawala
9ae4a03784 Allow changing of the users password without leaving the app. Fixes #2891 2017-11-28 10:55:54 +00:00
Alexander Lakhin
8860bc3c3e Saved user language was not being picked up in case of non-server mode.
Because - the get_locale(...) function was being executed before any
request, and user login after first request. Hence - the values for
the labels in the Preferences are not being translated properly.

Fetch the raw value of user_language from configuration in case of
runtime/non-server mode to fix the issue.
2017-10-30 18:20:41 +05:30
Khushboo Vashi
91406d2879 Ensure HTMLMIN is only used with Python 2.7+ 2017-10-10 09:14:23 +01:00
Harshal Dhumal
f0ad26ba7a Fix for Exception when the server is restarted. Fixes #2713
This issue was caused because we recently added session_write_delay in session.
So session won't be written/updated to disk from memory until specified seconds are elapsed.

However we must forcefully write/update session to disk if user loges in or out irrespective of session_write_delay to keep sessions from memory and disk in sync as user logged in status is kept in session.
2017-09-18 14:39:43 +01:00
Harshal Dhumal
765e130336 Support Flask-Security 3.0 2017-09-18 11:40:09 +01:00
Surinder Kumar
7835da267b Allow pgAdmin to run with config database versions from the future. Fixes #2664 2017-08-29 15:03:02 +01:00
Murtuza Zabuawala
178d583bcd Fix paths under non-standard virtual directories. Fixes #2563 2017-07-25 10:15:18 +01:00
Murtuza Zabuawala
64f3a559ab Add the Flask-Paranoid module for a little extra, well, paranoia in web mode. Fixes #2584 2017-07-20 18:04:33 +01:00
Dave Page
83ac1f3555 Remove debug logging of the URL map which is extremely long now, and not of a great deal of use. 2017-07-20 16:15:53 +01:00
Khushboo Vashi
1ee555e468 Ensure the feature tests use the correct test settings database. Fixes #2486 2017-06-16 10:17:38 +01:00
Ashesh Vashi
fd3ddbeafb Implementation of the client side 'url_for(...)' function.
Created a url_for function module to be used by different javascript
modules to use the same functionality of flask at client side.

A python module can expose the list of endpoints, used by its
javascripts, by overriding the 'get_exposed_url_endpoints(self)'
function.

In this patch, we have modified all the browser modules to use this
function. It will allow us to move the majority of the javascript
modules of browser nodes from templates directory to the static
directory.

TODO::
- Move these javascripts modules to the static directory.
- Use this function in all the applicable javascript modules.
  e.g. tools, miscellaneous modules
2017-06-12 12:01:25 +05:30
Dave Page
be42b67f79 Ensure all required directories are created before we start logging. 2017-05-15 15:59:47 +01:00
Sarah McAlear
6283ef7f5e [Configuration][Migration] Use 'alembic' for migration of the SQLite
based configuration file from one version to another, and also allows us
to have a single path of creating the table instead of creating tables
using SQLAlchemy or hand rolled SQL

This allows us to run the migrations directly in the code, and it will
avoid the error prone version numbering.

Patched by: Sarah McAlear
Revisions: Joao Pedro De Almeida Pereira, George Gelashvili.
Reviewed by: Ashesh Vashi, Murtuza Zabuawala
2017-04-24 08:37:27 +05:30
Dave Page
b2ab35e990 Don't require an auth key for the static help files. It doesn't play nicely with webkit. 2017-03-26 21:52:31 -04:00
Khushboo Vashi
0eda6033df Allow users to select UI language at login or from Preferences rather than unpredictable behaviour from browsers. Fixes #2190 2017-03-24 14:20:10 +00:00
Dave Page
670c8a2cc1 Disable HTMLMIN with Python 2.6 as it doesn't work on that older version. 2017-03-09 15:21:52 +00:00
Ashesh Vashi
f2fc1ceba8 Resolved quite a few file-system encoding/decoding related cases.
In order to resolve the non-ascii characters in path (in user directory,
storage path, etc) on windows, we have converted the path into the
short-path, so that - we don't need to deal with the encoding issues
(specially with Python 2).

We've resolved majority of the issues with this patch.
We still need couple issues to resolve after this in the same area.

TODO
* Add better support for non-ascii characters in the database name on
  windows with Python 3
* Improve the messages created after the background processes by
  different modules (such as Backup, Restore, Import/Export, etc.),
  which does not show short-paths, and xml representable characters for
  non-ascii characters, when found in the database objects, and the file
  PATH.

Fixes #2174, #1797, #2166, #1940

Initial patch by: Surinder Kumar
Reviewed by: Murtuza Zabuawala
2017-03-07 15:31:03 +05:30
Dave Page
3317a02120 Fix regression tests with runtime auth. Fixes #2228 2017-03-06 15:24:52 +00:00
Dave Page
6696b3c316 Authenticate the runtime to the server. Fixes #2228 2017-03-06 14:53:49 +00:00
Murtuza Zabuawala
9ad1316990 Various encoding fixes. Fixes #2160 2017-02-16 11:00:40 +00:00
George Gelashvili
19be3529f8 Create a template loader for SQL templates.
This will automatically find the correct version of a template for the server version, and allows us to remove templates that were previously duplicated for different server versions.

Patch by George & Tira at Pivotal. Review by me and Murtuza from EDB.

Discussion: https://www.postgresql.org/message-id/flat/CAHowoHaU9_pkCt%2B1g8dpY3hsXXZmsJZiJH-3-_Hd%2BC1MxiGhtA%40mail.gmail.com#CAHowoHaU9_pkCt+1g8dpY3hsXXZmsJZiJH-3-_Hd+C1MxiGhtA@mail.gmail.com
2017-01-30 11:25:03 +00:00
Dave Page
f221194bcc Update copyright notices for 2017. 2017-01-04 13:33:32 +00:00
Dave Page
8ae4a10c64 Apparently Flask-HTMLmin still requires django-htmlmin 2016-11-21 13:37:52 +00:00
Dave Page
020bf1d532 Minify HTML with Flask-HTMLMIN 2016-11-18 16:42:38 +00:00
Dave Page
f736051309 Handle broken config databases much more gracefully. Fixes #1922 2016-11-02 17:00:26 +02:00
Dave Page
bc5cc964a3 Move security keys into the SQLite database, and auto-generate them.
This avoids packagers having to deal with the issue, which can be
difficult if they need to cater for both server and desktop modes.

Fixes #1849
2016-10-19 09:22:38 +01:00
Surinder Kumar
7cfcf14312 Move the declaration of a variable into the correct scope. 2016-09-09 14:50:51 +01:00
Murtuza Zabuawala
1b75679ec4 Python 2.6 fixes. Fixes #1636. Fixes #1659 2016-09-06 14:07:30 +01:00