fix: profile settings html sanitization
This commit is contained in:
parent
d1e8e2b27c
commit
37d034db39
7 changed files with 6 additions and 66 deletions
|
@ -133,7 +133,7 @@ pub async fn login_request(
|
|||
}
|
||||
|
||||
// verify password
|
||||
let user = match data.get_user_by_username(&props.username).await {
|
||||
let user = match data.get_user_by_username_no_cache(&props.username).await {
|
||||
Ok(ua) => ua,
|
||||
Err(_) => return (None, Json(Error::IncorrectPassword.into())),
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use super::{render_error, PaginatedQuery, RepostsQuery, SearchedQuery};
|
||||
use crate::{assets::initial_context, get_lang, get_user_from_token, sanitize::clean_context, State};
|
||||
use crate::{assets::initial_context, get_lang, get_user_from_token, State};
|
||||
use axum::{
|
||||
Extension,
|
||||
extract::{Path, Query},
|
||||
|
@ -557,10 +557,6 @@ pub async fn settings_request(
|
|||
let mut context = initial_context(&data.0.0, lang, &Some(user)).await;
|
||||
|
||||
context.insert("community", &community);
|
||||
context.insert(
|
||||
"community_context_serde",
|
||||
&clean_context(&community.context),
|
||||
);
|
||||
|
||||
context.insert("can_manage_channels", &can_manage_channels);
|
||||
context.insert("channels", &channels);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use super::{render_error, PaginatedQuery, ProfileQuery};
|
||||
use crate::{
|
||||
assets::initial_context, check_user_blocked_or_private, get_lang, get_user_from_token,
|
||||
sanitize::clean_settings, State,
|
||||
assets::initial_context, check_user_blocked_or_private, get_lang, get_user_from_token, State,
|
||||
};
|
||||
use axum::{
|
||||
Extension,
|
||||
|
@ -84,7 +83,6 @@ pub async fn settings_request(
|
|||
context.insert("uploads", &uploads);
|
||||
context.insert("stacks", &stacks);
|
||||
context.insert("blocks", &blocks);
|
||||
context.insert("user_settings_serde", &clean_settings(&profile.settings));
|
||||
context.insert(
|
||||
"user_tokens_serde",
|
||||
&serde_json::to_string(&tokens)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue