blazer 3.5.0 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b7506f6c446fe95dce3cc747a7687c958c3bbf16fe936d339af3dad38cd4266d
|
|
4
|
+
data.tar.gz: 2885833c997a9145746158a5431330e67bb11a18af780dc57b45795b9fd34ceb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e773b1b9bd9a470f33a52d98d89bc4067a5aad85d4b7173a36f2c486b287b13d2f282ea7a4506a9a4e85c1d293a53a6dbe7e7bf47c849b27dfe98fae9e4fbc3
|
|
7
|
+
data.tar.gz: e944e8de07d1032c80fd501b08f9bf06e9176503fa6c3fe15a3134af756b31cbaa7d215556ba12f8e8f433339d5ba415a90eb1834b951404035a7db0c0836689
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## 3.5.1 (2026-07-31)
|
|
2
|
+
|
|
3
|
+
- Fixed delete buttons
|
|
4
|
+
- Fixed table preview and schema page for Postgres < 16
|
|
5
|
+
- Fixed error with Sass
|
|
6
|
+
|
|
1
7
|
## 3.5.0 (2026-07-27)
|
|
2
8
|
|
|
3
9
|
- Fixed stored XSS vulnerability - [more info](https://github.com/ankane/blazer/security/advisories/GHSA-m5f6-4589-m89f)
|
|
@@ -58,10 +58,43 @@ document.addEventListener("click", function (e) {
|
|
|
58
58
|
if (target) {
|
|
59
59
|
if (!window.confirm(target.getAttribute("data-confirm"))) {
|
|
60
60
|
e.preventDefault()
|
|
61
|
+
e.stopImmediatePropagation()
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
})
|
|
64
65
|
|
|
66
|
+
function isSameOrigin(href) {
|
|
67
|
+
return new URL(href, window.location.href).origin === window.location.origin
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
document.addEventListener("click", function (e) {
|
|
71
|
+
const target = e.target.closest("a[data-method]")
|
|
72
|
+
if (target) {
|
|
73
|
+
e.preventDefault()
|
|
74
|
+
|
|
75
|
+
const form = document.createElement("form")
|
|
76
|
+
form.method = "post"
|
|
77
|
+
form.action = target.href
|
|
78
|
+
form.hidden = true
|
|
79
|
+
|
|
80
|
+
let params = {"_method": target.getAttribute("data-method")}
|
|
81
|
+
if (isSameOrigin(target.href)) {
|
|
82
|
+
params = csrfProtect(params)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
for (const [k, v] of Object.entries(params)) {
|
|
86
|
+
const input = document.createElement("input")
|
|
87
|
+
input.type = "hidden"
|
|
88
|
+
input.name = k
|
|
89
|
+
input.value = v
|
|
90
|
+
form.append(input)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
document.body.append(form)
|
|
94
|
+
form.submit()
|
|
95
|
+
}
|
|
96
|
+
})
|
|
97
|
+
|
|
65
98
|
// make autofocus work with back button
|
|
66
99
|
window.addEventListener("pageshow", function (e) {
|
|
67
100
|
if (e.persisted) {
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
cursor: pointer;
|
|
226
226
|
}
|
|
227
227
|
.plugin-clear_button.form-select .clear-button, .plugin-clear_button.single .clear-button {
|
|
228
|
-
right:
|
|
228
|
+
right: Max(var(--ts-pr-caret), 8px);
|
|
229
229
|
}
|
|
230
230
|
.plugin-clear_button.focus.has-items .clear-button, .plugin-clear_button:not(.disabled):hover.has-items .clear-button {
|
|
231
231
|
opacity: 1;
|
|
@@ -373,11 +373,11 @@
|
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
.ts-control:not(.rtl) {
|
|
376
|
-
padding-right:
|
|
376
|
+
padding-right: Max(var(--ts-pr-min), calc(var(--ts-pr-clear-button) + var(--ts-pr-caret))) !important;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
.ts-control.rtl {
|
|
380
|
-
padding-left:
|
|
380
|
+
padding-left: Max(var(--ts-pr-min), calc(var(--ts-pr-clear-button) + var(--ts-pr-caret))) !important;
|
|
381
381
|
}
|
|
382
382
|
|
|
383
383
|
.ts-wrapper {
|
|
@@ -75,7 +75,7 @@ module Blazer
|
|
|
75
75
|
if sqlite?
|
|
76
76
|
"SELECT NULL, name FROM sqlite_master WHERE type IN ('table', 'view') ORDER BY name"
|
|
77
77
|
elsif postgresql?
|
|
78
|
-
add_schemas("SELECT * FROM (SELECT table_schema, table_name FROM information_schema.tables UNION ALL SELECT n.nspname AS table_schema, c.relname AS table_name FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE c.relkind = 'm' AND has_any_column_privilege(c.oid, 'SELECT'))")
|
|
78
|
+
add_schemas("SELECT * FROM (SELECT table_schema, table_name FROM information_schema.tables UNION ALL SELECT n.nspname AS table_schema, c.relname AS table_name FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE c.relkind = 'm' AND has_any_column_privilege(c.oid, 'SELECT')) AS tables")
|
|
79
79
|
else
|
|
80
80
|
add_schemas("SELECT table_schema, table_name FROM information_schema.tables")
|
|
81
81
|
end
|
|
@@ -106,7 +106,7 @@ module Blazer
|
|
|
106
106
|
if sqlite?
|
|
107
107
|
"SELECT NULL, t.name, c.name, c.type, c.cid FROM sqlite_master t INNER JOIN pragma_table_info(t.name) c WHERE t.type IN ('table', 'view')"
|
|
108
108
|
elsif postgresql?
|
|
109
|
-
add_schemas("SELECT * FROM (SELECT table_schema, table_name, column_name, data_type, ordinal_position FROM information_schema.columns UNION ALL SELECT n.nspname AS table_schema, c.relname AS table_name, a.attname AS column_name, format_type(a.atttypid, a.atttypmod) AS data_type, a.attnum AS ordinal_position FROM pg_attribute a INNER JOIN pg_class c ON a.attrelid = c.oid INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE a.attnum > 0 AND NOT a.attisdropped AND c.relkind = 'm' AND has_column_privilege(c.oid, a.attnum, 'SELECT'))")
|
|
109
|
+
add_schemas("SELECT * FROM (SELECT table_schema, table_name, column_name, data_type, ordinal_position FROM information_schema.columns UNION ALL SELECT n.nspname AS table_schema, c.relname AS table_name, a.attname AS column_name, format_type(a.atttypid, a.atttypmod) AS data_type, a.attnum AS ordinal_position FROM pg_attribute a INNER JOIN pg_class c ON a.attrelid = c.oid INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE a.attnum > 0 AND NOT a.attisdropped AND c.relkind = 'm' AND has_column_privilege(c.oid, a.attnum, 'SELECT')) AS columns")
|
|
110
110
|
else
|
|
111
111
|
add_schemas("SELECT table_schema, table_name, column_name, data_type, ordinal_position FROM information_schema.columns")
|
|
112
112
|
end
|
data/lib/blazer/version.rb
CHANGED