Self-regulation of metallic ion concentration in wet porous glass