Commit Graph

83 Commits

Author SHA1 Message Date
Matthew Rathbone
1c145aee61 fix: escape user-supplied values in SQL queries (buildSchemaFilter + Trino)
- buildSchemaFilter now uses escapeString() to escape single quotes in
  schema, only, and ignore filter values.
- Trino driver now wraps this.db with wrapIdentifier() in all queries
  (listSchemas, listTables, listTableColumns, buildPaginatedQuery).
- Trino listTableColumns escapes table and schema string literals.
- Added unit tests for SQL injection in buildSchemaFilter and Trino.
2026-03-06 14:33:55 -07:00
Matthew Rathbone
ab89dcaa67 fix: Trino listTables returns empty and SSL connections not supported (#3947, #3695)
- listTables(null) no longer returns []. Uses buildSchemaFilter() to
  optionally filter by schema, matching the PostgreSQL driver pattern.
- SSL/TLS connections now work. Certificate files (CA, cert, key) are
  read and passed to trino-client. When no certs are provided,
  rejectUnauthorized defaults to false (trust server cert).
- Removed server:ssl from Trino disabledFeatures so the SSL toggle
  appears in the connection form.
- URL parser now auto-enables ssl for https:// URLs.
- Added integration tests for listTables and SSL (with HTTPS-enabled
  Trino testcontainer).
- Added unit tests for SSL config propagation.
- Updated Trino connection docs (EN + ES) with SSL section.
2026-03-06 14:33:55 -07:00
Will Montgomery
0b67f08b57 Merge branch 'master' of github.com:beekeeper-studio/beekeeper-studio into feature/2157_Import-Can-Create-Tables 2025-08-18 23:25:41 -04:00
Matthew Rathbone
c980c34b0a Merge pull request #3282 from beekeeper-studio/claude/issue-3262-20250611_023617
fix: handle read-only permission errors gracefully in PostgreSQL table properties
2025-08-15 17:19:39 -04:00
Will Montgomery
1dcbed3f05 Merge branch 'master' into feature/2157_Import-Can-Create-Tables 2025-06-26 22:40:14 -04:00
Will Montgomery
376f2a1f9f test: tests were different but weren't showing as different 2025-06-26 22:38:42 -04:00
Will Montgomery
dcee108bf2 Merge branch 'master' into feature/2157_Import-Can-Create-Tables 2025-06-25 20:24:09 -04:00
azmy60
0f1632c873 add mutators tests 2025-06-25 21:09:17 +07:00
azmy60
eaa3e04e15 fix broken test 2025-06-25 20:59:39 +07:00
Will Montgomery
5f06506c0b build: yarn.lock merge conflict (accepted all incoming 2025-06-18 21:45:46 -04:00
azmy60
8ec18a15d6 Merge branch 'master' into fix/json-columns 2025-06-18 20:02:04 +07:00
Day Matchullis
1d521ba583 Merge pull request #2925 from tcctr/Bug-Fix 2025-06-17 16:36:23 -06:00
claude[bot]
cb3a75caf4 feat: add user-facing permission error messages for PostgreSQL table properties
Resolves @rathboma's feedback to show users which information couldn't be displayed due to permissions.

## Changes
- Add permissionWarnings field to TableProperties interface
- Modified PostgreSQL client to collect and return user-friendly permission error messages
- Added "Limited Info" warning indicator in table properties status bar
- Added clickable warning with detailed notification showing what information is restricted
- Updated tests to verify permission warnings are properly returned

## User Experience
- Clear visual indicator when some table information can't be displayed
- Detailed tooltip and notification explaining specific permission limitations
- Relations tab continues to work and shows available information

Co-authored-by: Matthew Rathbone <rathboma@users.noreply.github.com>
2025-06-13 20:16:52 +00:00
claude[bot]
6d41769522 fix: properly initialize PostgreSQL client in read-only permission test
- Set _defaultSchema and version properties for test client
- Mock wrapTable method to return properly formatted identifier
- Ensures test client is properly initialized when created with null parameters

Co-authored-by: Matthew Rathbone <rathboma@users.noreply.github.com>
2025-06-13 19:45:37 +00:00
claude[bot]
e2b38637cc fix: handle read-only permission errors gracefully in PostgreSQL table properties
- Modified getTableProperties method to wrap each query in individual error handlers
- Ensures relations are still displayed even when permission-sensitive queries fail
- Added comprehensive unit test to prevent regression
- Fixes issue where Relations tab shows empty for read-only PostgreSQL connections

Resolves #3262

Co-authored-by: rathboma <rathboma@users.noreply.github.com>
2025-06-11 02:43:37 +00:00
azmy60
7ce6169ef1 add tests 2025-04-25 16:21:56 +07:00
Will Montgomery
5753aa852c Merge branch 'master' into feature/2157_Import-Can-Create-Tables 2025-04-11 14:21:39 -04:00
Tomás Lourenço Silvestre
30b4e887f7 Merge branch 'master' into development 2025-04-05 18:34:17 +01:00
Will Montgomery
baa82c6a6a Merge branch 'master' into feature/2157_Import-Can-Create-Tables 2025-04-05 13:09:24 -04:00
azmy60
434594db3e rename detail_view.ts -> jsonViewer.ts 2025-04-02 19:47:46 +07:00
Tomás Lourenço Silvestre
63a1a30a72 Fix #2699: Prevent exposing internal errors in UI
Previously, when running a query to a file, internal
erros were being exposed in the UI,
exposing implementation related errors to end users.
This fix ensures that errors are properly handled and
displayed as user-friendly messages instead of raw internal values.
2025-03-24 23:04:08 +00:00
Will Montgomery
35e5142d95 test: add unit tests for the column types 2025-03-20 21:57:37 -04:00
Tiago Rebelo
6f377fc0b8 Fix #2695: Unable to Export Queries from Saved Queries
Changed the way defaultPath was given a name by removing a function that was not returning anything and was breaking the code. Also added a test case.
2025-03-17 22:02:33 +00:00
azmy60
65c77cafdd fix text selection in query editor 2025-02-11 18:45:52 +07:00
Will Montgomery
ace10427ff Merge branch 'master' into feature/1341_reorder-columns 2024-11-20 11:29:24 -05:00
azmy60
7d1c92879c fix unit tests 2024-11-15 09:40:39 +07:00
Will Montgomery
b95355a124 test: remove a function call from a test (function was taken away) 2024-10-21 18:09:31 -04:00
Will Montgomery
fa72822958 feat: add re-order for firebird 2024-10-21 18:01:24 -04:00
Will Montgomery
52526d4a3a test: add a test for the mysql change builder 2024-10-20 20:17:58 -04:00
Will Montgomery
2289c29f62 refactor: remove a commented out set of tests 2024-10-14 20:28:19 -04:00
Will Montgomery
4632bc226f feat: mysql change builder updates 2024-10-14 20:27:07 -04:00
Will Montgomery
8c2d48fb8b feat: add some types and tests for creating a modify column order 2024-10-09 19:15:35 -04:00
azmy60
334019a427 truncate long strings 2024-10-04 22:58:13 +07:00
Matthew Rathbone
b829d49fc1 Tests for html comment removal in minify
- Works according to the html spec

Fix: #2421
2024-09-13 11:05:50 -05:00
azmy60
d5ffdc1608 use markers instead of bookmarks for better look 2024-08-30 15:59:52 +07:00
azmy60
a4ad91c092 expanding nested foreign keys works!! :D 2024-08-29 16:34:06 +07:00
Matthew Rathbone
d4ad695678 more fixes 2024-08-09 13:24:52 -05:00
Day Matchullis
129d3db45d continuing to get through context isolation, vue files may be good now 2024-07-16 13:01:16 -06:00
Matthew Rathbone
ba8a4b5808 disconnect and destroy 2024-06-22 15:56:44 -05:00
Day Matchullis
3ed18f70f3 generator handler, table schema, and table builder 2024-05-29 15:56:10 -06:00
azmy60
452eb2db28 in mysql, show prefix in table index 2024-05-06 18:41:55 +07:00
Matthew Rathbone
86714cd5cb Minor ultimate code backports 2024-04-12 14:49:48 -05:00
Matthew Rathbone
bb0035e0d5 Huge amount of backports to get all DB drivers in community for easier driver management 2024-02-26 15:58:28 -06:00
Matthew Rathbone
2c6a2b0e49 psql test fix 2024-02-21 21:16:03 -06:00
Day Matchullis
8234274cf3 im dumb 2024-01-18 20:32:34 -07:00
Day Matchullis
0f721888af fix parseQueryRowResult tests 2024-01-18 20:30:21 -07:00
Day Matchullis
ec43832d7a unit tests use client now 2024-01-18 20:26:10 -07:00
Day Matchullis
ceb78dad59 fix unit tests 2024-01-18 20:09:18 -07:00
Day Matchullis
6471bbaa12 fix unit tests 2023-10-27 10:34:49 -06:00
azmy60
7ab9ec3baf rollback sql-hint to previous commit and rewrite schema autocomplete 2023-09-30 16:54:08 +07:00