Skip to content

Latest commit

 

History

History
1035 lines (1003 loc) · 40.6 KB

index.md

File metadata and controls

1035 lines (1003 loc) · 40.6 KB
layout title tags maintenance
col-sidebar
OWASP Membership Portal
OWASP membership, owspmem
false

{% if page.maintenance %} The Membership portal is currently undergoing maintenance and will return soon. Thank you for your patience. {% else %}

<style> [v-cloak] {display: none} #member-qr { float:right; padding: 16px; } .label { font-weight: bold; margin-right: 8px; } .info, .multi-info { margin-bottom:16px; margin-left: 75px; } label { font-weight: bold; margin-right:8px; } button { margin-right: 16px; } .small { padding: 2px 8px; } .errors { padding-bottom: 24px; padding-top: 12px; border-top: 3px dotted red; } .error { font-weight:bold; color: darkred; border-left: 5px solid red; padding-left: 8px; } .info-section { border: 3px solid darkblue; border-radius: 8px; padding: 8px; margin-top: 40px; } .section-label { margin-top: -20px; background: white; } .capitalize { text-transform: capitalize; } .danger-button { background-color: #dc3545; } </style>

{% raw %}

Please correct the following:
{{ msg }}
No membership was found or your membership has expired. Please Join Us
If you are a leader who has not applied for complimentary membership, you may do so at Become a Member
If you feel this message is in error, submit a JIRA ticket at Membership Portal Support
Your session has expired. Please Log In

Welcome, {{ membership_data.name }}


Member Number:
{{ membership_data.member_number.substring( membership_data.member_number.lastIndexOf("/") + 1 ) }}
Member Number:
Data not found. Contact Member Services
Membership Type:
{{ membership_data.membership_type }}
Membership End:
{{ membership_data.membership_end }}
Renew Now
No membership data found.
Renew Now

Provision an OWASP Email Address

Choose one from the list below:
(If you already have an OWASP email, please do not provision another)
{{error[0]}}
  {{em}}
{{provision_message}}

Your Email was Created

To access your OWASP email, please go to Google Mail and logout of any current account OR click Add another account. Choose 'Forgot password' and 'try another way' then 'receive a verification code'.

Personal Information

Email:
{{ item.email }} [Membership Email]
{{ item.email }}
Address:
{{ membership_data.address.street }}
{{ membership_data.address.city }}
{{ membership_data.address.state }}
{{ membership_data.address.postal_code }}
{{ membership_data.address.country }}
Phone:
{{ item.number }}
Edit Personal Information
Name:
Email: +
x
Address:
Street:
City:
State:
Postal Code:
Country: Afghanistan Åland Islands Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua and Barbuda Argentina Armenia Aruba Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bolivia, Plurinational State of Bonaire, Sint Eustatius and Saba Bosnia and Herzegovina Botswana Bouvet Island Brazil British Indian Ocean Territory Brunei Darussalam Bulgaria Burkina Faso Burundi Cambodia Cameroon Canada Cape Verde Cayman Islands Central African Republic Chad Chile China Christmas Island Cocos (Keeling) Islands Colombia Comoros Congo Congo, the Democratic Republic of the Cook Islands Costa Rica Côte d'Ivoire Croatia Cuba Curaçao Cyprus Czech Republic Denmark Djibouti Dominica Dominican Republic Ecuador Egypt El Salvador Equatorial Guinea Eritrea Estonia Ethiopia Falkland Islands (Malvinas) Faroe Islands Fiji Finland France French Guiana French Polynesia French Southern Territories Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guernsey Guinea Guinea-Bissau Guyana Haiti Heard Island and McDonald Islands Holy See (Vatican City State) Honduras Hong Kong Hungary Iceland India Indonesia Iran, Islamic Republic of Iraq Ireland Isle of Man Israel Italy Jamaica Japan Jersey Jordan Kazakhstan Kenya Kiribati Korea, Democratic People's Republic of Korea, Republic of Kuwait Kyrgyzstan Lao People's Democratic Republic Latvia Lebanon Lesotho Liberia Libya Liechtenstein Lithuania Luxembourg Macao Macedonia, the former Yugoslav Republic of Madagascar Malawi Malaysia Maldives Mali Malta Marshall Islands Martinique Mauritania Mauritius Mayotte Mexico Micronesia, Federated States of Moldova, Republic of Monaco Mongolia Montenegro Montserrat Morocco Mozambique Myanmar Namibia Nauru Nepal Netherlands New Caledonia New Zealand Nicaragua Niger Nigeria Niue Norfolk Island Northern Mariana Islands Norway Oman Pakistan Palau Palestinian Territory, Occupied Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Poland Portugal Puerto Rico Qatar Réunion Romania Russian Federation Rwanda Saint Barthélemy Saint Helena, Ascension and Tristan da Cunha Saint Kitts and Nevis Saint Lucia Saint Martin (French part) Saint Pierre and Miquelon Saint Vincent and the Grenadines Samoa San Marino Sao Tome and Principe Saudi Arabia Senegal Serbia Seychelles Sierra Leone Singapore Sint Maarten (Dutch part) Slovakia Slovenia Solomon Islands Somalia South Africa South Georgia and the South Sandwich Islands South Sudan Spain Sri Lanka Sudan Suriname Svalbard and Jan Mayen Swaziland Sweden Switzerland Syrian Arab Republic Taiwan, Province of China Tajikistan Tanzania, United Republic of Thailand Timor-Leste Togo Tokelau Tonga Trinidad and Tobago Tunisia Turkey Turkmenistan Turks and Caicos Islands Tuvalu Uganda Ukraine United Arab Emirates United Kingdom United States United States Minor Outlying Islands Uruguay Uzbekistan Vanuatu Venezuela, Bolivarian Republic of Viet Nam Virgin Islands, British Virgin Islands, U.S. Wallis and Futuna Western Sahara Yemen Zambia Zimbabwe
Phone: +
x
Cancel Save

Leadership Information

{{ item['group-type'] }} Leader
{{ item.group }}

Billing Information

Manage Recurring Membership

{{ membership.subscription_name }}
{{ membership.card.brand }} ending in {{ membership.card.last_4 }}
Next Billing Date: {{ membership.next_billing_date }}
Update Payment Information
{{ pendingCancellation === membership.checkout_session ? 'Are you sure?' : 'Cancel Recurring' }}

Manage Recurring Donations

{{ donation.subscription_name }}
{{ donation.card.brand }} ending in {{ donation.card.last_4 }}
Next Billing Date: {{ donation.next_billing_date }}
Update Payment Information
{{ pendingCancellation === donation.checkout_session ? 'Are you sure?' : 'Cancel Recurring' }}
<div id="loading" v-if="loading">
  This may take a few moments...
  <button class="cta-button" style="width: 80px; height: 80px">
    <div class="spinner">
      <div class="inner-spinner"></div>
    </div>
  </button>
</div>
{% endraw %} <script src="https://js.stripe.com/v3"></script> <script src="https://unpkg.com/vue@2"></script> <script src="https://unpkg.com/axios/dist/axios.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js"></script> <script> var stripe = Stripe('pk_live_mw0B2kiXQTFkD44liAEI03oT00S5AGfSV3'); window.addEventListener('load', function() { new Vue({ el: '#membership-portal-app', data() { return { loading: true, errors: [], membership_data: null, update_interval: null, mode: 0, saved_data: null, member_logged_out: false, pendingCancellation: false, chosen_email: '', provision_email_message: false, provision_message: 'Provision', provision_disabled: false }; }, created: function () { if (this.loading) { this.getMemberInfo(); } // end if loading }, computed: { membersubs: function () { return _.filter(_.get(this.membership_data, 'subscriptions', []), { type: 'membership' }); }, donations: function () { return _.filter(_.get(this.membership_data, 'subscriptions', []), { type: 'donation' }); }, member_ready() { return ( !this.loading && this.membership_data != null && this.membership_data.name ); }, renewal_near() { if (this.membership_data.membership_end) { var dt = Date.parse(this.membership_data.membership_end); var diff = Math.abs(dt - Date.now()); return true; // for now just show the button, regardless of if the end date is withint 30 days diff / (1000 * 60 * 60 * 24) < 30; } else return false; }, renewal_link() { if(this.membership_data.membership_email) return "https://owasp.org/membership?email=" + this.membership_data.membership_email; else return "https://owasp.org/membership/" } }, methods: { getMemberInfo: function () { const postData = { params: { authtoken: Cookies.get("CF_Authorization"), }, }; axios .get( "https://owaspadmin.azurewebsites.net/api/get-member-info?code=mWP6TjdDSJZOQIZQNtb2fUPuzuIamwaobBZUTnN24JEdtFybiTDl7A==", postData ) .then((response) => { this.membership_data = response.data; //Convert bad JSON to good JSON on new accounts if ( typeof this.membership_data.address === "string" && this.membership_data.address === "{'street':'','city':'','state':'','postal_code':'','country':''}" ) { this.membership_data.address = JSON.parse( this.membership_data.address.replace(/'/g, '"') ); } else if (typeof this.membership_data.address === "string") { this.membership_data.address = JSON.parse( this.membership_data.address ); } this.member_logged_out = false; this.loading = false; this.$forceUpdate(); setTimeout( function (membership_data) { if (membership_data && membership_data.name) { const el = kjua({ text: membership_data.member_number }); const div = document.getElementById("member-qr"); if (div) { div.appendChild(el); } } }, 1000, this.membership_data ); }) .catch((err) => { this.loading = false; console.error(err); // for now assuming this is local testing /* this.membership_data = {} this.membership_data.membership_type = 'one' this.membership_data['name'] = 'Harold Test Data' this.membership_data['membership_end'] = '2022-02-11' this.membership_data['emails'] = [{'email':'harold.blankenship@owasp.com'},{'email':'kithwood@gmail.com'}] this.membership_data.membership_email = 'harold.blankenship@owasp.com' this.membership_data.phone_numbers=[{'number':'5126443053'}] this.membership_data['membership_recurring']='no' this.membership_data['member_number'] = 'cst_34249829348298439283749' this.membership_data['address'] = {'street':'', 'city':'', 'state':'', 'postal_code':'', 'country':''} this.membership_data['member-qr'] = 'https://owasp.org' this.membership_data.leader_info = [{ "name": "Harold Blankenship", "email": "harold.blankenship@owasp.com", "group": "OWASP KLAP", "group-type": "project", "group_url": "https://owasp.org/www-projectchapter-example/" }, { "name": "Harold Blankenship", "email": "harold.blankenship@owasp.com", "group": "OWASP TRaP", "group-type": "project", "group_url": "https://owasp.org/www-projectchapter-example/" }, { "name": "Harold Blankenship", "email": "harold.blankenship@owasp.com", "group": "OWASP New Braunfels", "group-type": "chapter", "group_url": "https://owasp.org/www-projectchapter-example/" }] this.member_logged_out = false this.loading=false this.membership_data.subscriptions = [{"type":"membership", "subscription_name":"My Subscription", "card" : {"brand":"VISA", "last_4":"1234"}, "next_billing_date":"tomorrow", "checkout_session":"boo!"},{"type":"donation","subscription_name":"My Donation", "card" : {"brand":"VISA", "last_4":"1234"}, "next_billing_date":"tomorrow", "checkout_session":"Hoo!"}] this.membership_data.emaillist = ["harry.b@owasp.org","b.harry@owasp.org","claptrap@owasp.org"] setTimeout(function(membership_data) { if(membership_data && membership_data['name']) { el = kjua({text: membership_data['member_number']}); div = document.getElementById('member-qr'); if(div) { div.appendChild(el) } } }, 1000, this.membership_data) this.saved_data = JSON.parse(JSON.stringify(this.membership_data)) // */ this.$forceUpdate(); }); }, validate: function () { this.errors = []; if (this.membership_data?.name.length <= 0) { const nameError = { name: "Name must not be empty" }; console.warn(nameError); this.errors.push(nameError); } if (this.membership_data?.name.length > 128) { const nameError = { name: "Name must be between 1 and 128 characters" }; console.warn(nameError); this.errors.push(nameError); } if ( !("emails" in this.membership_data) || this.membership_data?.emails?.length <= 0) { const emailError = { email: "You must have at least one email." }; console.warn(emailError); this.errors.push(emailError); } for(email in this.membership_data?.emails) { if(email.length <= 0 || email.length > 72){ const emailError = { email: "Email address must be between 1 and 72 characters" }; console.warn(emailError); this.errors.push(emailError); } } if ( !("phone_numbers" in this.membership_data) || this.membership_data?.phone_numbers?.length <= 0) { const phoneError = { phone: "You must have at least one phone number.", }; console.warn(phoneError); this.errors.push(phoneError); } for(pnumber in this.membership_data?.phone_numbers) { if(pnumber.length <= 0 || pnumber.length > 72) { const phoneError = { phone: "Phone number must be between 1 and 72 characters", }; console.warn(phoneError); this.errors.push(phoneError); } } if ( !("address" in this.membership_data) || this.membership_data?.address?.street?.length <= 0 || this.membership_data?.address?.city?.length <= 0 || this.membership_data?.address?.postal_code?.length <= 0 || this.membership_data?.address?.country?.length <= 0) { const addressError = { address: "You must have a valid address." }; console.warn(addressError); this.errors.push(addressError); } if(this.membership_data?.address?.street?.length > 72 || this.membership_data?.address?.city?.length > 72 || this.membership_data?.address?.postal_code?.length > 72 || this.membership_data?.address?.country?.length > 72) { const addressError = { address: "Address fields must be between 1 and 72 characters" }; console.warn(addressError); this.errors.push(addressError); } return this.errors.length === 0; }, switchMode: function () { this.mode = !this.mode; if (this.saved_data) { this.membership_data = JSON.parse(JSON.stringify(this.saved_data)); } this.errors = []; // why doesn't this set errors to empty? this.$forceUpdate(); return false; }, removePhoneItem: function (item) { this.errors = []; if (this.membership_data.phone_numbers?.length <= 1) { if (!this.errors.some((e) => e.phone)) { this.errors.push({ phone: "You must have at least one phone number.", }); } //this.errors = [] this.$forceUpdate(); return false; } this.membership_data.phone_numbers.splice( this.membership_data.phone_numbers.indexOf(item), 1 ); this.$forceUpdate(); return false; }, addPhoneItem: function () { this.errors = []; if (!("phone_numbers" in this.membership_data)) this.membership_data.phone_numbers = []; this.membership_data.phone_numbers.push({ number: "" }); this.$forceUpdate(); return false; }, removeEmailItem: function (item) { this.errors = []; if (this.membership_data.emails.length <= 1) { if (!this.errors.some((e) => e.email)) { const emailError = { email: "You must have at least one email." }; console.warn(emailError); this.errors.push(emailError); } //this.errors = [] this.$forceUpdate(); return false; } if (this.membership_data.membership_email == item.email) { if (!this.errors.some((e) => e.email)) { const emailError = { email: "You may not delete your membership email." }; console.warn(emailError); this.errors.push(emailError); } this.$forceUpdate(); return false; } this.membership_data.emails.splice( this.membership_data.emails.indexOf(item), 1 ); this.$forceUpdate(); return false; }, addEmailItem: function () { this.errors = []; if (!("emails" in this.membership_data)) this.membership_data.emails = []; this.membership_data.emails.push({ email: "" }); this.$forceUpdate(); return false; }, saveInformation: function () { this.$forceUpdate(); if (this.validate()) { this.loading = true; const postData = { params: { authtoken: Cookies.get("CF_Authorization"), membership_data: this.membership_data, }, }; axios .post( "https://owaspadmin.azurewebsites.net/api/update-member-info?code=NRBl9EyVfVJYZCos5BuhquJ8KlPj/X35Isl7kNj6uk0Zr88xhPJZ5A==", postData ) .then(() => { this.loading = false; this.mode = 0; this.$forceUpdate(); }) .catch((err) => { //this.errors.push({message : 'These are not the droids you are looking for' }) this.loading = false; const error = { error: err }; console.warn(error); this.errors.push(error); this.mode = 0; this.$forceUpdate(); }); } }, // BELOW FUNCTIONS NEED UPDATING TO FUNCTION redirectToAzure: function () { let vm = this; if(!vm.chosen_email || vm.chosen_email == '') { let errors = {}; errors.chosen_email = ['Please choose an email address.']; this.errors = errors; vm.$nextTick(function () { document.getElementById('provision-error').scrollIntoView(); }) return; } vm.provision_message = 'Please wait...(this may take some time)'; vm.provision_disabled = true; const postData = { token: this.membership_data.customer_token, email: vm.chosen_email }; axios.post('https://owaspadmin.azurewebsites.net/api/provisionemail?code=KpGlIqooyYW3GYEHuYTYzRmwSiVbeGQ4xRRarY7UWhBLwoRASFVn3g==', postData) .then(function (response) { vm.membership_data.emaillist = [] vm.provision_email_message = true }).catch(function (error) { vm.errors = [error] }); }, redirectToStripe: function (sessionId) { stripe.redirectToCheckout({ sessionId: sessionId }).then(function (result) { }); }, doCancellation: function (sessionId) { if (this.pendingCancellation && this.pendingCancellation === sessionId) { let vm = this; const postData = { token: sessionId }; axios.post('https://owaspadmin.azurewebsites.net/api/CancelSubscription?code=Wo2wqKKpOMZP0LycmMGWLl3z8wGqK0BoIPRL/3At9W31ZnHZSRn8xw==', postData) .then(function (response) { vm.loading = true; vm.getMemberInfo(); }).finally(function () { vm.pendingCancellation = null; }) } else { this.pendingCancellation = sessionId; } }, }, // end methods }) // end Vue }, false) // end addEventListener </script>

{% endif %}