From 1cb350e22d8c7a234e4da4557382127a0c058785 Mon Sep 17 00:00:00 2001 From: Jonathan Poelen Date: Fri, 20 Oct 2023 17:14:14 +0200 Subject: [PATCH] [config] whitespace trim right for description --- projects/redemption_configs/autogen/doc/config.json | 12 ++++++------ .../autogen/include/configs/autogen/str_ini.hpp | 5 ----- .../include/configs/autogen/str_python_spec.hpp | 2 +- .../src/configs/generators/config.hpp | 4 ++++ 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/projects/redemption_configs/autogen/doc/config.json b/projects/redemption_configs/autogen/doc/config.json index 6e90c38da0..f74286f615 100644 --- a/projects/redemption_configs/autogen/doc/config.json +++ b/projects/redemption_configs/autogen/doc/config.json @@ -48,7 +48,7 @@ "name": "vault_transformation_rule", "type": "str", "value": "", - "description": "Account Mapping password retriever\nTransformation to apply to find the correct account.\n${USER} will be replaced by the user's login.\n${DOMAIN} will be replaced by the user's domain (in case of LDAP mapping).\n${USER_DOMAIN} will be replaced by the user's login + \"@\" + user's domain (or just user's login if there's no domain).\n${GROUP} will be replaced by the authorization's user group.\n${DEVICE} will be replaced by the device's name.\nA regular expression is allowed to transform a variable, with the syntax: ${USER:/regex/replacement}, groups can be captured with parentheses and used with \\1, \\2, ...\nFor example to replace leading \"A\" by \"B\" in the username: ${USER:/^A/B}\nEmpty value means no transformation rule.\n", + "description": "Account Mapping password retriever\nTransformation to apply to find the correct account.\n${USER} will be replaced by the user's login.\n${DOMAIN} will be replaced by the user's domain (in case of LDAP mapping).\n${USER_DOMAIN} will be replaced by the user's login + \"@\" + user's domain (or just user's login if there's no domain).\n${GROUP} will be replaced by the authorization's user group.\n${DEVICE} will be replaced by the device's name.\nA regular expression is allowed to transform a variable, with the syntax: ${USER:/regex/replacement}, groups can be captured with parentheses and used with \\1, \\2, ...\nFor example to replace leading \"A\" by \"B\" in the username: ${USER:/^A/B}\nEmpty value means no transformation rule.", "rdp": true, "vnc": true, "jh": true, @@ -408,7 +408,7 @@ "name": "allow_scale_factor", "type": "bool", "value": false, - "description": "Sends Scale & Layout configuration to the server.\nOn Windows 11, this corresponds to options Sclale, Display Resolution and Display Orientation of Settings > System > Display.\n⚠ Title bar detection via OCR will no longer work.\n", + "description": "Sends Scale & Layout configuration to the server.\nOn Windows 11, this corresponds to options Sclale, Display Resolution and Display Orientation of Settings > System > Display.\n⚠ Title bar detection via OCR will no longer work.", "tags": ["compatibility"], "globalSpec": true }, @@ -442,7 +442,7 @@ "name": "tls_support", "type": "bool", "value": true, - "description": "Enable TLS between client and proxy.\n", + "description": "Enable TLS between client and proxy.", "iniOnly": true }, { @@ -665,7 +665,7 @@ "name": "force_performance_flags", "type": "PerformanceFlags", "value": "-mouse_cursor_shadows,-theme", - "description": "It specifies a list of (comma-separated) RDP server desktop features to enable or disable in the session (with the goal of optimizing bandwidth usage).\n\nIf a feature is preceded by a \"-\" sign, it is disabled; if it is preceded by a \"+\" sign or no sign, it is enabled. Unconfigured features can be controlled by the RPD client.\n\nAvailable features:\n - wallpaper\n - full_window_drag\n - menu_animations\n - theme\n - mouse_cursor_shadows\n - cursor_blinking\n - font_smoothing\n - desktop_composition\n", + "description": "It specifies a list of (comma-separated) RDP server desktop features to enable or disable in the session (with the goal of optimizing bandwidth usage).\n\nIf a feature is preceded by a \"-\" sign, it is disabled; if it is preceded by a \"+\" sign or no sign, it is enabled. Unconfigured features can be controlled by the RPD client.\n\nAvailable features:\n - wallpaper\n - full_window_drag\n - menu_animations\n - theme\n - mouse_cursor_shadows\n - cursor_blinking\n - font_smoothing\n - desktop_composition", "tags": ["perf","compatibility"], "globalSpec": true, "advanced": true @@ -1181,7 +1181,7 @@ "name": "session_shadowing_support", "type": "bool", "value": true, - "description": "Enables Session Shadowing Support.\nSession probe must be enabled on target connection policy.\nTarget server must support \"Remote Desktop Shadowing\" feature.\nWhen enabled, users can share their RDP sessions with auditors who request it.\n", + "description": "Enables Session Shadowing Support.\nSession probe must be enabled on target connection policy.\nTarget server must support \"Remote Desktop Shadowing\" feature.\nWhen enabled, users can share their RDP sessions with auditors who request it.", "globalSpec": true, "advanced": true }, @@ -2090,7 +2090,7 @@ "name": "encodings", "type": "list", "value": "", - "description": "Sets additional graphics encoding types that will be negotiated with the VNC server:\n 2: RRE\n 5: HEXTILE\n 16: ZRLE\n", + "description": "Sets additional graphics encoding types that will be negotiated with the VNC server:\n 2: RRE\n 5: HEXTILE\n 16: ZRLE", "globalSpec": true, "advanced": true, "subtype": "int" diff --git a/projects/redemption_configs/autogen/include/configs/autogen/str_ini.hpp b/projects/redemption_configs/autogen/include/configs/autogen/str_ini.hpp index 519af20f8d..e13a06f877 100644 --- a/projects/redemption_configs/autogen/include/configs/autogen/str_ini.hpp +++ b/projects/redemption_configs/autogen/include/configs/autogen/str_ini.hpp @@ -122,7 +122,6 @@ R"gen_config_ini(## Config file for RDP proxy. # Sends Scale & Layout configuration to the server. # On Windows 11, this corresponds to options Sclale, Display Resolution and Display Orientation of Settings > System > Display. # ⚠ Title bar detection via OCR will no longer work. -# # (type: boolean (0/no/false or 1/yes/true)) #allow_scale_factor = 0 @@ -141,7 +140,6 @@ R"gen_config_ini(## Config file for RDP proxy. #tls_fallback_legacy = 0 # Enable TLS between client and proxy. -# # (type: boolean (0/no/false or 1/yes/true)) #tls_support = 1 @@ -296,7 +294,6 @@ R"gen_config_ini(## Config file for RDP proxy. # - cursor_blinking # - font_smoothing # - desktop_composition -# #_advanced #force_performance_flags = -mouse_cursor_shadows,-theme @@ -575,7 +572,6 @@ R"gen_config_ini(## Config file for RDP proxy. # Session probe must be enabled on target connection policy. # Target server must support "Remote Desktop Shadowing" feature. # When enabled, users can share their RDP sessions with auditors who request it. -# # (type: boolean (0/no/false or 1/yes/true)) #_advanced #session_shadowing_support = 1 @@ -1148,7 +1144,6 @@ R"gen_config_ini(## Config file for RDP proxy. # 2: RRE # 5: HEXTILE # 16: ZRLE -# # (values are comma-separated) #_advanced #encodings = diff --git a/projects/redemption_configs/autogen/include/configs/autogen/str_python_spec.hpp b/projects/redemption_configs/autogen/include/configs/autogen/str_python_spec.hpp index f8e0efa859..4a77e63d27 100644 --- a/projects/redemption_configs/autogen/include/configs/autogen/str_python_spec.hpp +++ b/projects/redemption_configs/autogen/include/configs/autogen/str_python_spec.hpp @@ -318,7 +318,7 @@ clipboard_down = boolean(default=False) # Sets additional graphics encoding types that will be negotiated with the VNC server: #     2: RRE #     5: HEXTILE -#     16: ZRLE

+#     16: ZRLE
# (values are comma-separated) #_advanced encodings = string(default="") diff --git a/projects/redemption_configs/src/configs/generators/config.hpp b/projects/redemption_configs/src/configs/generators/config.hpp index 6c6b835456..9685acf522 100644 --- a/projects/redemption_configs/src/configs/generators/config.hpp +++ b/projects/redemption_configs/src/configs/generators/config.hpp @@ -2103,6 +2103,10 @@ struct GeneratorConfig Names const& names = mem_info.name; std::string_view desc = mem_info.desc; + // trim right + while (!desc.empty() && (desc.back() == ' ' || desc.back() == '\n')) { + desc.remove_suffix(1); + } bool const has_spec = bool(mem_info.spec.dest); bool const has_ini = has_spec