mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Remove the web console EPP endpoint
This removes the "create Domain/Host/Contact" forms that were supposed to be used instead of regular EPPs for CC-TLD that wanted to support it. We're removing it because we don't use it and want to reduce unneeded code for the registry 3.0 migration. Also, this is a security risk, as it allowed to do "billable actions" (creating a new domain for example) with the only authentication being access to the registrar's G Suite account. This bypassed the certificate, IP whitelist, and EPP password, which is bad. PUBLIC: Remove the web console EPP endpoint This removes the "create Domain/Host/Contact" forms that were supposed to be used instead of regular EPPs for CC-TLD that wanted to support it. We're removing it because we don't use it and want to reduce unneeded code for the registry 3.0 migration. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=236244195
This commit is contained in:
parent
193bd49406
commit
847795d58d
52 changed files with 58 additions and 3788 deletions
|
@ -23,14 +23,13 @@ goog.forwardDeclare('goog.Uri');
|
|||
|
||||
|
||||
/**
|
||||
* XHR launcher for both JSON and XML requests.
|
||||
* XHR launcher for JSON requests.
|
||||
* @param {!goog.Uri} defaultUri URI to which requests are POSTed.
|
||||
* @param {string} xsrfToken Cross-site request forgery protection token.
|
||||
* @param {!registry.Session.ContentType} contentType Payload mode.
|
||||
* @constructor
|
||||
* @template REQUEST, RESPONSE
|
||||
*/
|
||||
registry.Session = function(defaultUri, xsrfToken, contentType) {
|
||||
registry.Session = function(defaultUri, xsrfToken) {
|
||||
|
||||
/**
|
||||
* URI to which requests are posted.
|
||||
|
@ -39,36 +38,19 @@ registry.Session = function(defaultUri, xsrfToken, contentType) {
|
|||
*/
|
||||
this.uri = defaultUri;
|
||||
|
||||
/**
|
||||
* Content type set in request body.
|
||||
* @private {!registry.Session.ContentType}
|
||||
* @const
|
||||
*/
|
||||
this.contentType_ = contentType;
|
||||
|
||||
/**
|
||||
* XHR request headers.
|
||||
* @private {!Object<string, string>}
|
||||
* @const
|
||||
*/
|
||||
this.headers_ = {
|
||||
'Content-Type': contentType,
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
'X-CSRF-Token': xsrfToken,
|
||||
'X-Requested-With': 'XMLHttpRequest'
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Payload modes supported by this class.
|
||||
* @enum {string}
|
||||
*/
|
||||
registry.Session.ContentType = {
|
||||
JSON: 'application/json; charset=utf-8',
|
||||
EPP: 'application/epp+xml'
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Abstract method to send a request to the server.
|
||||
* @param {REQUEST} body HTTP request body as a string or JSON object.
|
||||
|
@ -99,9 +81,7 @@ registry.Session.prototype.sendXhrIo =
|
|||
registry.Session.prototype.onXhrComplete_ = function(onSuccess, onError, e) {
|
||||
if (e.target.isSuccess()) {
|
||||
onSuccess(/** @type {!RESPONSE} */ (
|
||||
this.contentType_ == registry.Session.ContentType.JSON ?
|
||||
e.target.getResponseJson(registry.Session.PARSER_BREAKER_) :
|
||||
e.target.getResponseXml()));
|
||||
e.target.getResponseJson(registry.Session.PARSER_BREAKER_)));
|
||||
} else {
|
||||
onError(e.target.getLastError());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue