Alon Bar-Lev has posted comments on this change. Change subject: engine: Integrate noVNC support ......................................................................
Patch Set 7: (3 inline comments) .................................................... File backend/manager/modules/root/src/main/webapp/ovirt-engine-novnc-main.html Line 128: 'shared': WebUtil.getQueryVar('shared', true), Line 129: 'view_only': WebUtil.getQueryVar('view_only', false), Line 130: 'updateState': updateState, Line 131: 'onPasswordRequired': passwordRequired}); Line 132: rfb.connect(host, port, ticket, path); yes. while checking the expiration of the ticket at server side. Line 133: }catch(e) {alert(e);} Line 134: } Line 135: Line 136: if (window.addEventListener) { .................................................... File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/crypt/TicketUtils.java Line 81: Calendar.getInstance( Line 82: TimeZone.getTimeZone("UTC") Line 83: ).getTime() Line 84: ) Line 85: ); I had a mistake here... date came out in local time. Should be: SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss"); df.setTimeZone(TimeZone.getTimeZone("UTC")); map.put( "time", df.format(new Date()) ); Line 86: map.put("data", data); Line 87: Line 88: /* Line 89: * Calculate signature on fields in map .................................................... File packaging/services/ovirt-websocket-proxy.py Line 85: self._key.verify_update(decoded[field].encode('utf8')) Line 86: if self._key.verify_final( Line 87: base64.b64decode(decoded['signature']) Line 88: ) != 1: Line 89: raise ValueError('Invalid signature') This: if ( datetime.datetime.utcnow() - datetime.datetime.strptime(decoded['time'], '%Y%m%d%H%M%S') ) > datetime.timedelta(seconds=self._lifetime): raise ValueError('Life time expired') Line 90: return decoded['data'] Line 91: Line 92: Line 93: class Daemon(service.Daemon): -- To view, visit http://gerrit.ovirt.org/13931 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I44e9870b88537360a1886e89c08f18865eae2ef0 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Frank Kobzik <fkob...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com> Gerrit-Reviewer: Itamar Heim <ih...@redhat.com> Gerrit-Reviewer: Martin Beták <mbe...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches