mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-06 13:27:45 +00:00
fix(console): set metadata value encoding to utf-8 (#6392)
* fix: set encoding to utf-8 * org metadata encoding * user detail mgmt encoding * utf-8 encoding decoding of saml applications --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
parent
aa2d547eb2
commit
a141b8f3e7
@ -248,7 +248,7 @@ export class OrgDetailComponent implements OnInit, OnDestroy {
|
||||
this.metadata = resp.resultList.map((md) => {
|
||||
return {
|
||||
key: md.key,
|
||||
value: Buffer.from(md.value as string, 'base64').toString('ascii'),
|
||||
value: Buffer.from(md.value as string, 'base64').toString('utf-8'),
|
||||
};
|
||||
});
|
||||
})
|
||||
|
@ -521,7 +521,7 @@ export class AppCreateComponent implements OnInit, OnDestroy {
|
||||
get decodedBase64(): string {
|
||||
const samlReq = this.samlAppRequest.toObject();
|
||||
if (samlReq && samlReq.metadataXml && typeof samlReq.metadataXml === 'string') {
|
||||
return Buffer.from(samlReq.metadataXml, 'base64').toString('ascii');
|
||||
return Buffer.from(samlReq.metadataXml, 'base64').toString('utf-8');
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
@ -529,7 +529,7 @@ export class AppCreateComponent implements OnInit, OnDestroy {
|
||||
|
||||
set decodedBase64(xmlString) {
|
||||
if (this.samlAppRequest) {
|
||||
const base64 = Buffer.from(xmlString, 'ascii').toString('base64');
|
||||
const base64 = Buffer.from(xmlString, 'utf-8').toString('base64');
|
||||
this.samlAppRequest.setMetadataXml(base64);
|
||||
}
|
||||
}
|
||||
|
@ -786,7 +786,7 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
||||
this.app.samlConfig.metadataXml &&
|
||||
typeof this.app.samlConfig.metadataXml === 'string'
|
||||
) {
|
||||
return Buffer.from(this.app?.samlConfig.metadataXml, 'base64').toString('ascii');
|
||||
return Buffer.from(this.app?.samlConfig.metadataXml, 'base64').toString('utf-8');
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
@ -794,7 +794,7 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
||||
|
||||
set decodedBase64(xmlString: string) {
|
||||
if (this.app && this.app.samlConfig && this.app.samlConfig.metadataXml) {
|
||||
const base64 = Buffer.from(xmlString, 'ascii').toString('base64');
|
||||
const base64 = Buffer.from(xmlString, 'utf-8').toString('base64');
|
||||
|
||||
if (this.app.samlConfig) {
|
||||
this.app.samlConfig.metadataXml = base64;
|
||||
|
@ -406,7 +406,7 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
this.metadata = resp.resultList.map((md) => {
|
||||
return {
|
||||
key: md.key,
|
||||
value: Buffer.from(md.value as string, 'base64').toString('ascii'),
|
||||
value: Buffer.from(md.value as string, 'base64').toString('utf8'),
|
||||
};
|
||||
});
|
||||
})
|
||||
|
@ -508,7 +508,7 @@ export class UserDetailComponent implements OnInit {
|
||||
this.metadata = resp.resultList.map((md) => {
|
||||
return {
|
||||
key: md.key,
|
||||
value: Buffer.from(md.value as string, 'base64').toString('ascii'),
|
||||
value: Buffer.from(md.value as string, 'base64').toString('utf-8'),
|
||||
};
|
||||
});
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user