htsmsg_destroy(config2);
if (config.server_name == NULL || config.server_name[0] == '\0')
config.server_name = strdup("Tvheadend");
+ if (config.realm == NULL || config.realm[0] == '\0')
+ config.realm = strdup("tvheadend");
if (config.http_server_name == NULL || config.http_server_name[0] == '\0')
config.http_server_name = strdup("HTS/tvheadend");
if (!config_scanfile_ok)
config.version = ARRAY_SIZE(config_migrate_table);
tvh_str_set(&config.full_version, tvheadend_version);
tvh_str_set(&config.server_name, "Tvheadend");
+ tvh_str_set(&config.realm, "tvheadend");
tvh_str_set(&config.http_server_name, "HTS/tvheadend");
idnode_changed(&config.idnode);
.opts = PO_HIDDEN | PO_EXPERT,
.group = 1
},
+ {
+ .type = PT_STR,
+ .id = "http_realm_name",
+ .name = N_("HTTP realm name"),
+ .desc = N_("The realm name for the HTTP authorization."),
+ .off = offsetof(config_t, realm),
+ .opts = PO_HIDDEN | PO_EXPERT,
+ .group = 1
+ },
{
.type = PT_BOOL,
.id = "hbbtv",
realm = http_get_header_value(hc->hc_authhdr, "realm");
nonce_count = http_get_header_value(hc->hc_authhdr, "nc");
cnonce = http_get_header_value(hc->hc_authhdr, "cnonce");
- if (realm == NULL || nonce_count == NULL || cnonce == NULL) {
+ if (realm == NULL || strcmp(realm, config.realm) ||
+ nonce_count == NULL || cnonce == NULL) {
goto end;
} else {
snprintf(all, sizeof(all), "%s:%s:%s:%s:%s",