You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a specific warning when a URL parameter and a form field have the
same name. The previous general warning about referencing form fields
with the `$var` syntax was confusing in that case.
see #1001
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@
5
5
- All [standard web encodings](https://encoding.spec.whatwg.org/#concept-encoding-get) are supported.
6
6
- Additionally, `base64` can be specified to decode binary data as base64 (compatible with [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs))
7
7
- By default, the old behavior of the `fetch_with_meta` function is preserved: the response body is decoded as `utf-8` if possible, otherwise the response is encoded in `base64`.
8
+
- Added a specific warning when a URL parameter and a form field have the same name. The previous general warning about referencing form fields with the `$var` syntax was confusing in that case.
8
9
9
10
## v0.36.1
10
11
- Fix regression introduced in v0.36.0: PostgreSQL money values showed as 0.0
log::warn!("Deprecation warning! ${x} was used to reference a form field value (a POST variable) instead of a URL parameter. This will stop working soon. Please use :{x} instead.");
163
-
Some(v)
164
-
}else{
165
-
request.get_variables.get(x)
161
+
StmtParam::PostOrGet(x) => {
162
+
let post_val = request.post_variables.get(x);
163
+
let get_val = request.get_variables.get(x);
164
+
ifletSome(v) = post_val {
165
+
ifletSome(get_val) = get_val {
166
+
log::warn!(
167
+
"Deprecation warning! There is both a URL parameter named '{x}' with value '{get_val}' and a form field named '{x}' with value '{v}'. \
168
+
SQLPage is using the value from the form submission, but this is ambiguous, can lead to unexpected behavior, and will stop working in a future version of SQLPage. \
169
+
To fix this, please rename the URL parameter to something else, and reference the form field with :{x}."
170
+
);
171
+
}else{
172
+
log::warn!("Deprecation warning! ${x} was used to reference a form field value (a POST variable) instead of a URL parameter. This will stop working soon. Please use :{x} instead.");
0 commit comments