Merge pull request #1826 from matrix-org/luke/fix-leaking-features-to-guests

Fix to prevent guests from seeing features
This commit is contained in:
Luke Barnard 2018-04-06 11:24:32 +01:00 committed by GitHub
commit fb9b376cb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,7 +102,7 @@ export default class DeviceSettingsHandler extends SettingsHandler {
_readFeature(featureName) {
if (MatrixClientPeg.get() && MatrixClientPeg.get().isGuest()) {
// Guests should not have any labs features enabled.
return {enabled: false};
return false;
}
const value = localStorage.getItem("mx_labs_feature_" + featureName);