X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FEditProfilePage.java;fp=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FEditProfilePage.java;h=d0ddb26329427917407af749037017fcf1e713b9;hp=c79a1e91d3e92f7584d366e8828c62788e7e99e7;hb=f4f5fb752ff9aff0235a907e170c6961576562f6;hpb=7017646bf42cb265b6df539bb6def40b91d2f968 diff --git a/src/main/java/net/pterodactylus/sone/web/EditProfilePage.java b/src/main/java/net/pterodactylus/sone/web/EditProfilePage.java index c79a1e9..d0ddb26 100644 --- a/src/main/java/net/pterodactylus/sone/web/EditProfilePage.java +++ b/src/main/java/net/pterodactylus/sone/web/EditProfilePage.java @@ -17,11 +17,14 @@ package net.pterodactylus.sone.web; +import static net.pterodactylus.sone.text.TextFilter.filter; + import java.util.List; import net.pterodactylus.sone.data.Profile; import net.pterodactylus.sone.data.Profile.Field; import net.pterodactylus.sone.data.Sone; +import net.pterodactylus.sone.text.TextFilter; import net.pterodactylus.sone.web.page.FreenetRequest; import net.pterodactylus.util.number.Numbers; import net.pterodactylus.util.template.Template; @@ -85,7 +88,8 @@ public class EditProfilePage extends SoneTemplatePage { profile.setAvatar(webInterface.getCore().getImage(avatarId, false)); for (Field field : fields) { String value = request.getHttpRequest().getPartAsStringFailsafe("field-" + field.getId(), 400); - field.setValue(value); + String filteredValue = filter(request.getHttpRequest().getHeader("Host"), value); + field.setValue(filteredValue); } currentSone.setProfile(profile); webInterface.getCore().touchConfiguration();