Get rid of modernpaste everywhere, redirect it to paste.centos.org everywhere
Signed-off-by: Rick Elrod <relrod@redhat.com>
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
freezes: false
|
||||
mem_size: 4096
|
||||
num_cpus: 2
|
||||
tcp_ports: [22]
|
||||
proxy_tcp_ports: [80, 443]
|
||||
|
||||
fas_client_groups: paste-deleter
|
||||
sudoers: "{{ private }}/files/sudo/modernpaste-sudoers"
|
|
@ -1,12 +0,0 @@
|
|||
---
|
||||
nm: 255.255.255.0
|
||||
gw: 10.5.126.254
|
||||
dns: 10.5.126.21
|
||||
|
||||
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-fedora-27
|
||||
ks_repo: http://10.5.126.23/pub/fedora/linux/releases/27/Server/x86_64/os/
|
||||
|
||||
volgroup: /dev/vg_guests
|
||||
eth0_ip: 10.5.126.230
|
||||
vmhost: virthost12.phx2.fedoraproject.org
|
||||
datacenter: phx2
|
|
@ -1,14 +0,0 @@
|
|||
---
|
||||
nm: 255.255.255.0
|
||||
gw: 10.5.128.254
|
||||
dns: 10.5.126.21
|
||||
|
||||
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-fedora-27
|
||||
ks_repo: http://10.5.126.23/pub/fedora/linux/releases/27/Server/x86_64/os/
|
||||
|
||||
mem_size: 2048
|
||||
volgroup: /dev/vg_guests
|
||||
eth0_ip: 10.5.128.153
|
||||
vmhost: virthost03.stg.phx2.fedoraproject.org
|
||||
datacenter: phx2
|
||||
tcp_ports: [22, 80, 443]
|
|
@ -1,12 +0,0 @@
|
|||
---
|
||||
nm: 255.255.255.0
|
||||
gw: 10.5.126.254
|
||||
dns: 10.5.126.21
|
||||
|
||||
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-fedora-27
|
||||
ks_repo: http://10.5.126.23/pub/fedora/linux/releases/27/Server/x86_64/os/
|
||||
|
||||
volgroup: /dev/vg_guests
|
||||
eth0_ip: 10.5.126.238
|
||||
vmhost: virthost14.phx2.fedoraproject.org
|
||||
datacenter: phx2
|
|
@ -196,13 +196,6 @@ mdapi01.stg.phx2.fedoraproject.org
|
|||
[minimal]
|
||||
bkernel04.phx2.fedoraproject.org
|
||||
|
||||
[modernpaste]
|
||||
modernpaste01.phx2.fedoraproject.org
|
||||
modernpaste02.phx2.fedoraproject.org
|
||||
|
||||
[modernpaste_stg]
|
||||
modernpaste01.stg.phx2.fedoraproject.org
|
||||
|
||||
[bodhi_backend]
|
||||
# This one handles the mashing/releng stuff
|
||||
bodhi-backend01.phx2.fedoraproject.org
|
||||
|
@ -708,7 +701,6 @@ memcached01.stg.phx2.fedoraproject.org
|
|||
mm-backend01.stg.phx2.fedoraproject.org
|
||||
mm-crawler01.stg.phx2.fedoraproject.org
|
||||
mm-frontend01.stg.phx2.fedoraproject.org
|
||||
modernpaste01.stg.phx2.fedoraproject.org
|
||||
notifs-backend01.stg.phx2.fedoraproject.org
|
||||
notifs-web01.stg.phx2.fedoraproject.org
|
||||
notifs-web02.stg.phx2.fedoraproject.org
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
- import_playbook: /srv/web/infra/ansible/playbooks/groups/mariadb-server.yml
|
||||
- import_playbook: /srv/web/infra/ansible/playbooks/groups/mirrormanager.yml
|
||||
- import_playbook: /srv/web/infra/ansible/playbooks/groups/memcached.yml
|
||||
- import_playbook: /srv/web/infra/ansible/playbooks/groups/modernpaste.yml
|
||||
- import_playbook: /srv/web/infra/ansible/playbooks/groups/noc.yml
|
||||
- import_playbook: /srv/web/infra/ansible/playbooks/groups/notifs-backend.yml
|
||||
- import_playbook: /srv/web/infra/ansible/playbooks/groups/notifs-web.yml
|
||||
|
@ -110,7 +109,6 @@
|
|||
#- import_playbook: /srv/web/infra/ansible/playbooks/openshift-apps/transtats.yml
|
||||
#- import_playbook: /srv/web/infra/ansible/playbooks/openshift-apps/waiverdb.yml
|
||||
# These need work to finish and complete and are all stg currently.
|
||||
#- import_playbook: /srv/web/infra/ansible/playbooks/openshift-apps/modernpaste.yml
|
||||
#- import_playbook: /srv/web/infra/ansible/playbooks/openshift-apps/rats.yml
|
||||
|
||||
#
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
# requires --extra-vars="target='modernpaste01.phx2.fedoraproject.org' paste='WMk4~kSfeW1OUNsLjF8hlMnRi-rYnlYzizqToCmG3BY='"
|
||||
# where target is the box to run it on (usually modernpaste01.phx2 or modernpaste01.stg.phx2)
|
||||
# and where paste is the encrypted paste ID of the paste.
|
||||
|
||||
- name: Deactivates a modern-paste paste
|
||||
hosts: "{{ target }}"
|
||||
user: root
|
||||
|
||||
tasks:
|
||||
- name: Run deactivate-paste.py
|
||||
command: "python /usr/local/bin/deactivate-paste.py {{paste}}"
|
|
@ -1,53 +0,0 @@
|
|||
# create a new modernpaste server
|
||||
# NOTE: should be used with --limit most of the time
|
||||
# NOTE: make sure there is room/space for this server on the vmhost
|
||||
# NOTE: most of these vars_path come from group_vars/mirrorlist or from hostvars
|
||||
|
||||
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=modernpaste_stg:modernpaste"
|
||||
|
||||
- name: dole out the generic configuration
|
||||
hosts: modernpaste_stg:modernpaste
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
roles:
|
||||
- base
|
||||
- rkhunter
|
||||
- nagios_client
|
||||
- hosts
|
||||
- fas_client
|
||||
- sudo
|
||||
- collectd/base
|
||||
- fedmsg/base
|
||||
- { role: openvpn/client, when: env != "staging" }
|
||||
|
||||
pre_tasks:
|
||||
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
|
||||
|
||||
tasks:
|
||||
- import_tasks: "{{ tasks_path }}/2fa_client.yml"
|
||||
- import_tasks: "{{ tasks_path }}/motd.yml"
|
||||
|
||||
handlers:
|
||||
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
||||
|
||||
- name: dole out the service-specific config
|
||||
hosts: modernpaste_stg:modernpaste
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
roles:
|
||||
- modernpaste
|
||||
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- "{{ vars_path }}/{{ ansible_distribution }}.yml"
|
||||
|
||||
handlers:
|
||||
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
|
@ -91,7 +91,13 @@
|
|||
shortname: fpaste
|
||||
website: fpaste.org
|
||||
regex: /(.*)$
|
||||
target: https://paste.fedoraproject.org/$1
|
||||
target: https://paste.centos.org/$1
|
||||
|
||||
- role: httpd/redirectmatch
|
||||
shortname: modernpaste
|
||||
website: paste.fedoraproject.org
|
||||
regex: /(.*)$
|
||||
target: https://paste.centos.org/$1
|
||||
|
||||
- role: httpd/redirectmatch
|
||||
shortname: elections
|
||||
|
|
|
@ -129,12 +129,6 @@
|
|||
destname: askbot
|
||||
proxyurl: "{{ varnish_url }}"
|
||||
|
||||
- role: httpd/reverseproxy
|
||||
website: paste.fedoraproject.org
|
||||
destname: modernpaste
|
||||
keephost: true
|
||||
proxyurl: "{{ varnish_url }}"
|
||||
|
||||
- role: httpd/reverseproxy
|
||||
website: awx.fedoraproject.org
|
||||
destname: awx
|
||||
|
|
|
@ -542,9 +542,6 @@
|
|||
|
||||
- role: httpd/website
|
||||
site_name: paste.fedoraproject.org
|
||||
server_aliases:
|
||||
- paste.stg.fedoraproject.org
|
||||
- modernpaste.stg.fedoraproject.org
|
||||
sslonly: true
|
||||
cert_name: "{{wildcard_cert_name}}"
|
||||
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
- name: make the app be real
|
||||
hosts: os_masters_stg[0]
|
||||
user: root
|
||||
gather_facts: False
|
||||
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
roles:
|
||||
- role: openshift/project
|
||||
app: modernpaste
|
||||
description: modernpaste
|
||||
appowners:
|
||||
- codeblock
|
||||
- role: openshift/object
|
||||
app: modernpaste
|
||||
file: imagestream.yml
|
||||
- role: openshift/object
|
||||
app: modernpaste
|
||||
template: secret.yml
|
||||
- role: openshift/object
|
||||
app: modernpaste
|
||||
template: buildconfig.yml
|
||||
objectname: buildconfig.yml
|
||||
- role: openshift/start-build
|
||||
app: modernpaste
|
||||
buildname: modernpaste-docker-build
|
||||
- role: openshift/object
|
||||
app: modernpaste
|
||||
template: configmap.yml
|
||||
objectname: configmap.yml
|
||||
- role: openshift/object
|
||||
app: modernpaste
|
||||
file: service.yml
|
||||
objectname: service.yml
|
||||
- role: openshift/object
|
||||
app: modernpaste
|
||||
file: route.yml
|
||||
routename: modernpaste
|
||||
serviceport: web
|
||||
servicename: modernpaste
|
||||
- role: openshift/object
|
||||
app: modernpaste
|
||||
file: deploymentconfig.yml
|
||||
objectname: deploymentconfig.yml
|
||||
- role: openshift/rollout
|
||||
app: modernpaste
|
||||
dcname: modernpaste-web
|
|
@ -291,20 +291,6 @@ children:
|
|||
Fedora?</a> This site is a starting place for brand new
|
||||
contributors to help them figure out where they can
|
||||
hop on board!
|
||||
- name: Paste
|
||||
data:
|
||||
url: https://paste.fedoraproject.org
|
||||
source_url: https://github.com/sayakb/sticky-notes
|
||||
# Theme is from https://github.com/athmane/sticky-notes-fedora-skin
|
||||
bugs_url: https://github.com/sayakb/sticky-notes/pulls
|
||||
docs_url: https://sayakb.github.io/sticky-notes/pages/home/
|
||||
sops:
|
||||
- https://infrastructure.fedoraproject.org/infra/docs/fedorapastebin.rst
|
||||
status_mappings: ['fedorapaste']
|
||||
description: >
|
||||
Our very own pastebin server. If you yum install the
|
||||
<strong>fpaste</strong> command, it will use this site
|
||||
automatically.
|
||||
- name: Elections
|
||||
data:
|
||||
url: https://elections.fedoraproject.org/
|
||||
|
|
|
@ -358,18 +358,6 @@ backend oci-candidate-registry-backend
|
|||
balance hdr(appserver)
|
||||
server oci-candidate-registry01 oci-candidate-registry01:5000 check inter 10s rise 1 fall 2
|
||||
|
||||
frontend modernpaste-frontend
|
||||
bind 0.0.0.0:10055
|
||||
default_backend modernpaste-backend
|
||||
|
||||
backend modernpaste-backend
|
||||
balance hdr(appserver)
|
||||
server modernpaste01 modernpaste01:80 check inter 10s rise 1 fall 2
|
||||
{% if env == "production" %}
|
||||
server modernpaste02 modernpaste02:80 check inter 10s rise 1 fall 2
|
||||
{% endif %}
|
||||
option httpchk GET /
|
||||
|
||||
{% if 'phx2' in inventory_hostname %}
|
||||
|
||||
# Only enable this on phx2 proxies
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from ipsilon.providers.openidc.plugins.common import OpenidCExtensionBase
|
||||
|
||||
|
||||
class OpenidCExtension(OpenidCExtensionBase):
|
||||
name = 'modernpaste'
|
||||
display_name = 'Modern Paste'
|
||||
scopes = {
|
||||
'https://paste.fedoraproject.org/' {
|
||||
'display_name': 'authenticated modernpaste access',
|
||||
'claims': [],
|
||||
},
|
||||
}
|
|
@ -56,18 +56,18 @@
|
|||
- ipsilon
|
||||
- ipsilon/oidc_scopes
|
||||
|
||||
- name: Copy OpenID Connect scope registrations (STAGING)
|
||||
copy: src=oidc_scopes/{{item}}.py
|
||||
dest=/usr/lib/python2.7/site-packages/ipsilon/providers/openidc/plugins/{{item}}.py
|
||||
owner=root group=root mode=0644
|
||||
when: env == "staging"
|
||||
with_items:
|
||||
- modernpaste
|
||||
notify:
|
||||
- reload apache
|
||||
tags:
|
||||
- ipsilon
|
||||
- ipsilon/oidc_scopes
|
||||
#- name: Copy OpenID Connect scope registrations (STAGING)
|
||||
# copy: src=oidc_scopes/{{item}}.py
|
||||
# dest=/usr/lib/python2.7/site-packages/ipsilon/providers/openidc/plugins/{{item}}.py
|
||||
# owner=root group=root mode=0644
|
||||
# when: env == "staging"
|
||||
# with_items:
|
||||
# -
|
||||
# notify:
|
||||
# - reload apache
|
||||
# tags:
|
||||
# - ipsilon
|
||||
# - ipsilon/oidc_scopes
|
||||
|
||||
- name: Apply hotfix for taiga to get POST results
|
||||
copy: src=openid_server.py
|
||||
|
|
|
@ -25,7 +25,7 @@ global enabled=openid,saml2,openidc
|
|||
{% if env == "production" %}
|
||||
openidc enabled extensions=fedora-account,mbs,beaker,waiverdb,odcs,wiki,src,fpdc,kerneltest
|
||||
{% else %}
|
||||
openidc enabled extensions=fedora-account,mbs,beaker,waiverdb,odcs,wiki,src,modernpaste,fpdc,kerneltest
|
||||
openidc enabled extensions=fedora-account,mbs,beaker,waiverdb,odcs,wiki,src,fpdc,kerneltest
|
||||
{% endif %}
|
||||
|
||||
{% if env == 'staging' %}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
sys.path.append('/usr/share/modern-paste/app')
|
||||
import modern_paste
|
||||
from util.cryptography import get_decid
|
||||
from database.paste import deactivate_paste
|
||||
|
||||
print(deactivate_paste(get_decid(sys.argv[1])))
|
Before Width: | Height: | Size: 7.2 KiB |
|
@ -1,15 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
sys.path.append('/usr/share/modern-paste/app')
|
||||
import modern_paste
|
||||
from util.cryptography import get_decid
|
||||
from database.paste import get_paste_by_id
|
||||
|
||||
paste_id = get_decid(sys.argv[1])
|
||||
paste = get_paste_by_id(paste_id)
|
||||
|
||||
print('Decrypted ID: ' + str(paste_id))
|
||||
print('Title : ' + paste.title)
|
||||
print('Language : ' + paste.language)
|
||||
print('Views : ' + str(paste.views))
|
||||
print('Contents : \n' + paste.contents)
|
|
@ -1,265 +0,0 @@
|
|||
import flask
|
||||
from flask_login import current_user
|
||||
from modern_paste import app
|
||||
|
||||
import config
|
||||
from uri.main import *
|
||||
from uri.paste import *
|
||||
from util.exception import *
|
||||
from api.decorators import require_form_args
|
||||
from api.decorators import require_login_api
|
||||
from api.decorators import optional_login_api
|
||||
import constants.api
|
||||
import database.attachment
|
||||
import database.paste
|
||||
import database.user
|
||||
import util.cryptography
|
||||
|
||||
import datetime
|
||||
|
||||
@app.route(PasteSubmitURI.path, methods=['POST'])
|
||||
@require_form_args(['contents'])
|
||||
@optional_login_api
|
||||
def submit_paste():
|
||||
"""
|
||||
Endpoint for submitting a new paste.
|
||||
"""
|
||||
if config.REQUIRE_LOGIN_TO_PASTE and not current_user.is_authenticated:
|
||||
return (
|
||||
flask.jsonify(constants.api.UNAUTHENTICATED_PASTES_DISABLED_FAILURE),
|
||||
constants.api.UNAUTHENTICATED_PASTES_DISABLED_FAILURE_CODE,
|
||||
)
|
||||
|
||||
data = flask.request.get_json()
|
||||
|
||||
if not config.ENABLE_PASTE_ATTACHMENTS and len(data.get('attachments', [])) > 0:
|
||||
return (
|
||||
flask.jsonify(constants.api.PASTE_ATTACHMENTS_DISABLED_FAILURE),
|
||||
constants.api.PASTE_ATTACHMENTS_DISABLED_FAILURE_CODE,
|
||||
)
|
||||
|
||||
is_attachment_too_large = [
|
||||
# The data is encoded as a string: each character takes 1 B
|
||||
# The base64-encoded string is at 4/3x larger in size than the raw file
|
||||
len(attachment.get('data', '')) * 3 / 4.0 > config.MAX_ATTACHMENT_SIZE * 1000 * 1000
|
||||
for attachment in data.get('attachments', [])
|
||||
]
|
||||
if any(is_attachment_too_large) and config.MAX_ATTACHMENT_SIZE > 0:
|
||||
return (
|
||||
flask.jsonify(constants.api.PASTE_ATTACHMENT_TOO_LARGE_FAILURE),
|
||||
constants.api.PASTE_ATTACHMENT_TOO_LARGE_FAILURE_CODE,
|
||||
)
|
||||
|
||||
expire_hardcode = (datetime.datetime.now() + datetime.timedelta(weeks=1)).strftime('%s')
|
||||
expiry_time_given = data.get('expiry_time')
|
||||
if expiry_time_given:
|
||||
if int(expiry_time_given) > int(expire_hardcode):
|
||||
return (
|
||||
flask.jsonify(
|
||||
{ 'success': False,
|
||||
'message': 'Pastes can only have an expiry of one week.',
|
||||
'failure': 'paste_expiry_too_far_failure'
|
||||
}
|
||||
),
|
||||
400
|
||||
)
|
||||
else:
|
||||
expire_hardcode = expiry_time_given
|
||||
|
||||
try:
|
||||
new_paste = database.paste.create_new_paste(
|
||||
contents=data.get('contents'),
|
||||
user_id=current_user.user_id if current_user.is_authenticated else None,
|
||||
#expiry_time=data.get('expiry_time'),
|
||||
expiry_time=expire_hardcode,
|
||||
title=data.get('title'),
|
||||
language=data.get('language'),
|
||||
password=data.get('password'),
|
||||
# The paste is considered an API post if any of the following conditions are met:
|
||||
# (1) The referrer is null.
|
||||
# (2) The Home or PastePostInterface URIs are *not* contained within the referrer string (if a paste was
|
||||
# posted via the web interface, this is where the user should be coming from, unless the client performed
|
||||
# some black magic and spoofed the referrer string or something equally sketchy).
|
||||
is_api_post=not flask.request.referrer or not any(
|
||||
[uri in flask.request.referrer for uri in [HomeURI.full_uri(), PastePostInterfaceURI.full_uri()]]
|
||||
),
|
||||
)
|
||||
new_attachments = [
|
||||
database.attachment.create_new_attachment(
|
||||
paste_id=new_paste.paste_id,
|
||||
file_name=attachment.get('name'),
|
||||
file_size=attachment.get('size'),
|
||||
mime_type=attachment.get('mime_type'),
|
||||
file_data=attachment.get('data'),
|
||||
)
|
||||
for attachment in data.get('attachments', [])
|
||||
]
|
||||
resp_data = new_paste.as_dict().copy()
|
||||
resp_data['attachments'] = [
|
||||
{
|
||||
'name': attachment.file_name,
|
||||
'size': attachment.file_size,
|
||||
'mime_type': attachment.mime_type,
|
||||
}
|
||||
for attachment in new_attachments
|
||||
]
|
||||
return flask.jsonify(resp_data), constants.api.SUCCESS_CODE
|
||||
except:
|
||||
return flask.jsonify(constants.api.UNDEFINED_FAILURE), constants.api.UNDEFINED_FAILURE_CODE
|
||||
|
||||
|
||||
@app.route(PasteDeactivateURI.path, methods=['POST'])
|
||||
@require_form_args(['paste_id'])
|
||||
@optional_login_api
|
||||
def deactivate_paste():
|
||||
"""
|
||||
Endpoint for deactivating an existing paste.
|
||||
The user can deactivate a paste with this endpoint in two ways:
|
||||
(1) Supply a deactivation token in the request, or
|
||||
(2) Be currently logged in, and own the paste.
|
||||
"""
|
||||
data = flask.request.get_json()
|
||||
try:
|
||||
paste = database.paste.get_paste_by_id(util.cryptography.get_decid(data['paste_id']), active_only=True)
|
||||
if (current_user.is_authenticated and current_user.user_id == paste.user_id) or data.get('deactivation_token') == paste.deactivation_token:
|
||||
database.paste.deactivate_paste(paste.paste_id)
|
||||
return flask.jsonify({
|
||||
constants.api.RESULT: constants.api.RESULT_SUCCESS,
|
||||
constants.api.MESSAGE: None,
|
||||
'paste_id': util.cryptography.get_id_repr(paste.paste_id),
|
||||
}), constants.api.SUCCESS_CODE
|
||||
fail_msg = 'User does not own requested paste' if current_user.is_authenticated else 'Deactivation token is invalid'
|
||||
return flask.jsonify({
|
||||
constants.api.RESULT: constants.api.RESULT_FAULURE,
|
||||
constants.api.MESSAGE: fail_msg,
|
||||
constants.api.FAILURE: 'auth_failure',
|
||||
'paste_id': util.cryptography.get_id_repr(paste.paste_id),
|
||||
}), constants.api.AUTH_FAILURE_CODE
|
||||
except (PasteDoesNotExistException, InvalidIDException):
|
||||
return flask.jsonify(constants.api.NONEXISTENT_PASTE_FAILURE), constants.api.NONEXISTENT_PASTE_FAILURE_CODE
|
||||
except:
|
||||
return flask.jsonify(constants.api.UNDEFINED_FAILURE), constants.api.UNDEFINED_FAILURE_CODE
|
||||
|
||||
|
||||
@app.route(PasteSetPasswordURI.path, methods=['POST'])
|
||||
@require_form_args(['paste_id', 'password'], allow_blank_values=True)
|
||||
@require_login_api
|
||||
def set_paste_password():
|
||||
"""
|
||||
Modify a paste's password, unset it, or set a new one.
|
||||
"""
|
||||
data = flask.request.get_json()
|
||||
try:
|
||||
paste = database.paste.get_paste_by_id(util.cryptography.get_decid(data['paste_id']), active_only=True)
|
||||
if paste.user_id != current_user.user_id:
|
||||
return flask.jsonify({
|
||||
constants.api.RESULT: constants.api.RESULT_FAULURE,
|
||||
constants.api.MESSAGE: 'User does not own the specified paste',
|
||||
constants.api.FAILURE: 'auth_failure',
|
||||
'paste_id': util.cryptography.get_id_repr(paste.paste_id),
|
||||
}), constants.api.AUTH_FAILURE_CODE
|
||||
database.paste.set_paste_password(paste.paste_id, data['password'])
|
||||
return flask.jsonify({
|
||||
constants.api.RESULT: constants.api.RESULT_SUCCESS,
|
||||
constants.api.MESSAGE: None,
|
||||
'paste_id': util.cryptography.get_id_repr(paste.paste_id),
|
||||
}), constants.api.SUCCESS_CODE
|
||||
except (PasteDoesNotExistException, InvalidIDException):
|
||||
return flask.jsonify(constants.api.NONEXISTENT_PASTE_FAILURE), constants.api.NONEXISTENT_PASTE_FAILURE_CODE
|
||||
except:
|
||||
return flask.jsonify(constants.api.UNDEFINED_FAILURE), constants.api.UNDEFINED_FAILURE_CODE
|
||||
|
||||
|
||||
@app.route(PasteDetailsURI.path, methods=['POST'])
|
||||
@require_form_args(['paste_id'])
|
||||
def paste_details():
|
||||
"""
|
||||
Retrieve details for a particular paste ID.
|
||||
"""
|
||||
data = flask.request.get_json()
|
||||
try:
|
||||
paste = database.paste.get_paste_by_id(util.cryptography.get_decid(data['paste_id']), active_only=True)
|
||||
attachments = database.attachment.get_attachments_for_paste(util.cryptography.get_decid(data['paste_id']), active_only=True)
|
||||
paste_details_dict = paste.as_dict()
|
||||
paste_details_dict['poster_username'] = 'Anonymous'
|
||||
paste_details_dict['attachments'] = [
|
||||
attachment.as_dict()
|
||||
for attachment in attachments
|
||||
]
|
||||
if paste.user_id:
|
||||
poster = database.user.get_user_by_id(paste.user_id)
|
||||
paste_details_dict['poster_username'] = poster.username
|
||||
if not paste.password_hash or (data.get('password') and paste.password_hash == util.cryptography.secure_hash(data.get('password'))):
|
||||
return flask.jsonify({
|
||||
constants.api.RESULT: constants.api.RESULT_SUCCESS,
|
||||
constants.api.MESSAGE: None,
|
||||
'details': paste_details_dict,
|
||||
}), constants.api.SUCCESS_CODE
|
||||
else:
|
||||
return flask.jsonify({
|
||||
constants.api.RESULT: constants.api.RESULT_FAULURE,
|
||||
constants.api.MESSAGE: 'Password-protected paste: either no password or wrong password supplied',
|
||||
constants.api.FAILURE: 'password_mismatch_failure',
|
||||
'details': {},
|
||||
}), constants.api.AUTH_FAILURE_CODE
|
||||
except (PasteDoesNotExistException, UserDoesNotExistException, InvalidIDException):
|
||||
return flask.jsonify(constants.api.NONEXISTENT_PASTE_FAILURE), constants.api.NONEXISTENT_PASTE_FAILURE_CODE
|
||||
except:
|
||||
return flask.jsonify(constants.api.UNDEFINED_FAILURE), constants.api.UNDEFINED_FAILURE_CODE
|
||||
|
||||
|
||||
@app.route(PastesForUserURI.path, methods=['POST'])
|
||||
@require_login_api
|
||||
def pastes_for_user():
|
||||
"""
|
||||
Get all pastes for the currently logged in user.
|
||||
"""
|
||||
try:
|
||||
return flask.jsonify({
|
||||
constants.api.RESULT: constants.api.RESULT_SUCCESS,
|
||||
constants.api.MESSAGE: None,
|
||||
'pastes': [
|
||||
paste.as_dict()
|
||||
for paste in database.paste.get_all_pastes_for_user(current_user.user_id, active_only=True)
|
||||
],
|
||||
}), constants.api.SUCCESS_CODE
|
||||
except:
|
||||
return flask.jsonify(constants.api.UNDEFINED_FAILURE), constants.api.UNDEFINED_FAILURE_CODE
|
||||
|
||||
|
||||
@app.route(RecentPastesURI.path, methods=['POST'])
|
||||
@require_form_args(['page_num', 'num_per_page'])
|
||||
def recent_pastes():
|
||||
"""
|
||||
Get details for the most recent pastes.
|
||||
"""
|
||||
try:
|
||||
data = flask.request.get_json()
|
||||
return flask.jsonify({
|
||||
constants.api.RESULT: constants.api.RESULT_SUCCESS,
|
||||
constants.api.MESSAGE: None,
|
||||
'pastes': [
|
||||
paste.as_dict() for paste in database.paste.get_recent_pastes(data['page_num'], data['num_per_page'])
|
||||
],
|
||||
}), constants.api.SUCCESS_CODE
|
||||
except:
|
||||
return flask.jsonify(constants.api.UNDEFINED_FAILURE), constants.api.UNDEFINED_FAILURE_CODE
|
||||
|
||||
|
||||
@app.route(TopPastesURI.path, methods=['POST'])
|
||||
@require_form_args(['page_num', 'num_per_page'])
|
||||
def top_pastes():
|
||||
"""
|
||||
Get details for the top pastes.
|
||||
"""
|
||||
try:
|
||||
data = flask.request.get_json()
|
||||
return flask.jsonify({
|
||||
constants.api.RESULT: constants.api.RESULT_SUCCESS,
|
||||
constants.api.MESSAGE: None,
|
||||
'pastes': [
|
||||
paste.as_dict() for paste in database.paste.get_top_pastes(data['page_num'], data['num_per_page'])
|
||||
],
|
||||
}), constants.api.SUCCESS_CODE
|
||||
except:
|
||||
return flask.jsonify(constants.api.UNDEFINED_FAILURE), constants.api.UNDEFINED_FAILURE_CODE
|
|
@ -1,121 +0,0 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}
|
||||
Modern Paste
|
||||
{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
|
||||
{{ import_css([
|
||||
'lib/date-time-picker/jquery.datetimepicker.css',
|
||||
'lib/codemirror/lib/codemirror.css',
|
||||
])|safe }}
|
||||
|
||||
{{ import_js([
|
||||
'lib/date-time-picker/build/jquery.datetimepicker.full.min.js',
|
||||
'lib/codemirror/lib/codemirror.js',
|
||||
'paste/PostController.js',
|
||||
])|safe }}
|
||||
|
||||
{% if config.BUILD_ENVIRONMENT == 'dev' %}
|
||||
{% for language in config.LANGUAGES %}
|
||||
{% if language != 'text' %}
|
||||
{{ import_js(['lib/codemirror/mode/' ~ language ~ '/' ~ language ~ '.js'], defer=True)|safe }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{{ import_js(['paste/modes.js'], defer=True)|safe }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<!--Paste title-->
|
||||
<div class="paste-title-container section-label">
|
||||
<p class="sans-serif regular size-1 light-gray less-spaced">PASTE TITLE</p>
|
||||
<textarea class="paste-title minimal-input-field ubuntu-mono regular gray size-4" autocomplete="off">Untitled</textarea>
|
||||
</div>
|
||||
|
||||
<!--Paste language-->
|
||||
<div class="paste-language-container section-label">
|
||||
<p class="sans-serif regular size-1 light-gray less-spaced">PASTE LANGUAGE</p>
|
||||
<select class="language-selector ubuntu-mono regular gray" name="languages" autocomplete="off">
|
||||
{% for language in config.LANGUAGES %}
|
||||
<option value="{{ language|lower }}">{{ language|title }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!--More options-->
|
||||
<div class="more-options-container section-label">
|
||||
<span class="more-options-link">
|
||||
<span class="sans-serif regular size-1 light-gray less-spaced">MORE OPTIONS</span>
|
||||
<img class="arrow" src="/static/img/icons/arrows.png">
|
||||
</span>
|
||||
<!--<p class="option-description sans-serif regular size-1 light-gray less-spaced">PASTE EXPIRATION</p>
|
||||
<input id="date-time-picker" class="minimal-input-field underlined-input-field ubuntu-mono regular size-3" type="text" autocomplete="off" placeholder="Click to set a date">-->
|
||||
<p class="option-description sans-serif regular size-1 light-gray less-spaced">PASSWORD</p>
|
||||
<input type="password" class="paste-password minimal-input-field underlined-input-field regular size-3" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<!--Paste attachments-->
|
||||
{% if config.ENABLE_PASTE_ATTACHMENTS %}
|
||||
<div class="paste-attachments-container section-label">
|
||||
<p class="sans-serif regular size-1 light-gray less-spaced">PASTE ATTACHMENTS</p>
|
||||
<div class="attachments-upload-section">
|
||||
<a href="#" class="attachments-browse-button btn btn-default sans-serif semibold size-1 gray less-spaced">BROWSE FILES...</a>
|
||||
{% if config.MAX_ATTACHMENT_SIZE > 0 %}
|
||||
<span class="max-size-notice sans-serif regular size-1 light-gray less-spaced">Max size {{ config.MAX_ATTACHMENT_SIZE }} MB</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="attachments-list hidden ubuntu-mono regular size-2 gray">
|
||||
<template id="attachment-item-template">
|
||||
<div class="attachment-item faded">
|
||||
<i class="delete-attachment-icon fa fa-minus red hidden" aria-hidden="true"></i>
|
||||
<i class="attachment-loading-icon fa fa-circle-o-notch fa-spin" aria-hidden="true"></i>
|
||||
<span class="attachment-name"></span>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<input id="attachments-browse-input" class="hidden" type="file" multiple>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!--Paste contents-->
|
||||
<div class="paste-contents-container">
|
||||
<p class="sans-serif regular size-1 light-gray less-spaced">PASTE CONTENTS</p>
|
||||
</div>
|
||||
<div id="paste-post-contents"></div>
|
||||
|
||||
<!--Footer (paste metadata, submit button)-->
|
||||
<div id="footer">
|
||||
<div class="statistics-section">
|
||||
<span>
|
||||
<span class="line-count sans-serif semibold size-1 white spaced">1</span>
|
||||
<span class="sans-serif regular size-1 white spaced">LINES</span>
|
||||
<span class="character-count sans-serif semibold size-1 white spaced">0</span>
|
||||
<span class="sans-serif regular size-1 white spaced">CHARACTERS</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="submit-section">
|
||||
<span class="dark-link-alt">
|
||||
<a class="paste-download-link sans-serif semibold size-1 white spaced" href="#">DOWNLOAD PASTE AS PLAIN TEXT</a>
|
||||
<!--Hidden from the user; used to store the plain text data for launching the download via the link above.-->
|
||||
<a class="paste-download-content hidden" href="#" download></a>
|
||||
<button type="button" class="submit-button sans-serif semibold white size-2 spaced btn btn-success">
|
||||
SUBMIT
|
||||
<i class="submit-arrow fa fa-long-arrow-right"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="paste-submit-splash splash">
|
||||
<div class="spinner"><div></div></div>
|
||||
<p class="uploading-status sans-serif semibold size-2 gray less-spaced"></p>
|
||||
</div>
|
||||
|
||||
<div id="metadata" class="hidden">
|
||||
<div id="max-attachment-size" data-max-attachment-size="{{ config.MAX_ATTACHMENT_SIZE }}"></div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,96 +0,0 @@
|
|||
---
|
||||
- name: install needed packages
|
||||
package: name={{ item }} state=present
|
||||
with_items:
|
||||
- python-psycopg2
|
||||
- httpd
|
||||
- mod_wsgi
|
||||
- python2-mock
|
||||
- modern-paste
|
||||
- stickynotes2modernpaste
|
||||
- python2-flask-oidc
|
||||
tags:
|
||||
- packages
|
||||
- modernpaste
|
||||
|
||||
- name: modernpaste config
|
||||
template: src=config.py dest=/etc/modern-paste/config.py owner=apache group=apache mode=600
|
||||
tags:
|
||||
- config
|
||||
- modernpaste
|
||||
notify: reload httpd
|
||||
|
||||
- name: stickynotes2modernpaste config
|
||||
template: src=config.ini dest=/etc/stickynotes2modernpaste/config.ini owner=root group=root mode=644
|
||||
tags:
|
||||
- config
|
||||
- modernpaste
|
||||
notify: reload httpd
|
||||
|
||||
- name: modernpaste flask config
|
||||
template: src=flask_config.py dest=/etc/modern-paste/flask_config.py owner=apache group=apache mode=600
|
||||
tags:
|
||||
- config
|
||||
- modernpaste
|
||||
notify: reload httpd
|
||||
|
||||
- name: modernpaste oidc secrets
|
||||
template: src=client_secrets.json dest=/etc/modern-paste/client_secrets.json owner=apache group=apache mode=600
|
||||
when: env == 'staging'
|
||||
tags:
|
||||
- config
|
||||
- modernpaste
|
||||
notify: reload httpd
|
||||
|
||||
- name: modernpaste apache config
|
||||
template: src=modern-paste.conf dest=/etc/httpd/conf.d/modern-paste.conf owner=root group=root mode=644
|
||||
tags:
|
||||
- config
|
||||
- modernpaste
|
||||
notify: reload httpd
|
||||
|
||||
- name: Apply modernpaste hotfixes for forcing 1 week expiry (1)
|
||||
copy: src=post.html dest=/usr/share/modern-paste/app/templates/paste/post.html owner=root group=root mode=644
|
||||
when: env != 'staging'
|
||||
tags:
|
||||
- hotfix
|
||||
- modernpaste
|
||||
notify: reload httpd
|
||||
|
||||
- name: Apply modernpaste hotfixes for forcing 1 week expiry (2)
|
||||
copy: src=paste.py dest=/usr/share/modern-paste/app/api/paste.py owner=root group=root mode=644
|
||||
when: env != 'staging'
|
||||
tags:
|
||||
- hotfix
|
||||
- modernpaste
|
||||
notify: reload httpd
|
||||
|
||||
- name: Add fedora pastebin logo here for now due to packaging bug on relrod's part
|
||||
copy: src=fedorapastebin-logo.png dest=/usr/share/modern-paste/app/static/img/fedorapastebin-logo.png owner=root group=root mode=644
|
||||
tags:
|
||||
- modernpaste
|
||||
|
||||
- name: Script for manual paste deactivation
|
||||
copy: src=deactivate-paste.py dest=/usr/local/bin/deactivate-paste.py owner=root group=root mode=755
|
||||
tags:
|
||||
- modernpaste
|
||||
|
||||
- name: Script for paste information
|
||||
copy: src=paste-info.py dest=/usr/local/bin/paste-info.py owner=root group=root mode=755
|
||||
tags:
|
||||
- modernpaste
|
||||
|
||||
- name: set sebooleans so paste can talk to the db and sn2mp can talk to paste
|
||||
seboolean: name={{item}} state=true persistent=true
|
||||
with_items:
|
||||
- httpd_can_network_connect_db
|
||||
- httpd_can_network_connect
|
||||
tags:
|
||||
- config
|
||||
- selinux
|
||||
- modernpaste
|
||||
|
||||
- name: startup apache
|
||||
service: name=httpd enabled=yes state=started
|
||||
tags:
|
||||
- modernpaste
|
|
@ -1,25 +0,0 @@
|
|||
{% if env == 'staging' %}
|
||||
{"web": {
|
||||
"redirect_uris": ["https://modernpaste.stg.fedoraproject.org/oidc_callback"],
|
||||
"token_uri": "https://id.stg.fedoraproject.org/openidc/Token",
|
||||
"auth_uri": "https://id.stg.fedoraproject.org/openidc/Authorization",
|
||||
"client_id": "modernpaste",
|
||||
"client_secret": "{{stg_modernpaste_oidc_secret}}",
|
||||
"userinfo_uri": "https://id.stg.fedoraproject.org/openidc/UserInfo",
|
||||
"token_introspection_uri": "https://id.stg.fedoraproject.org/openidc/TokenInfo",
|
||||
"issuer": ["https://id.stg.fedoraproject.org/openidc/"]
|
||||
}
|
||||
}
|
||||
{% else %}
|
||||
{"web": {
|
||||
"redirect_uris": ["https://modernpaste.stg.fedoraproject.org/oidc_callback"],
|
||||
"token_uri": "https://id.fedoraproject.org/openidc/Token",
|
||||
"auth_uri": "https://id.fedoraproject.org/openidc/Authorization",
|
||||
"client_id": "modernpaste",
|
||||
"client_secret": "{{prod_modernpaste_oidc_secret}}",
|
||||
"userinfo_uri": "https://id.fedoraproject.org/openidc/UserInfo",
|
||||
"token_introspection_uri": "https://id.fedoraproject.org/openidc/TokenInfo",
|
||||
"issuer": ["https://id.stg.fedoraproject.org/openidc/"]
|
||||
}
|
||||
}
|
||||
{% endif %}
|
|
@ -1,6 +0,0 @@
|
|||
[stickynotes2modernpaste]
|
||||
{% if env == 'staging' %}
|
||||
modernpaste = https://paste.stg.fedoraproject.org
|
||||
{% else %}
|
||||
modernpaste = https://paste.fedoraproject.org
|
||||
{% endif %}
|
|
@ -1,117 +0,0 @@
|
|||
import constants
|
||||
|
||||
|
||||
# Domain from which you will access this app
|
||||
# If running on a port other than 80, append it after a colon at the end of the domain, e.g. 'domain.com:8080'
|
||||
{% if env == 'staging' %}
|
||||
DOMAIN = 'modernpaste.stg.fedoraproject.org'
|
||||
{% else %}
|
||||
DOMAIN = 'paste.fedoraproject.org'
|
||||
{% endif %}
|
||||
|
||||
# Use HTTPS by default?
|
||||
# This is only used for deciding whether to use the http:// or https:// prefix when constructing full URLs,
|
||||
# and is not related to your web server configuration.
|
||||
DEFAULT_HTTPS = True
|
||||
|
||||
# The type of build environment
|
||||
# build_environment.DEV won't minify CSS and Closure-compile JavaScript; build_environment.PROD will.
|
||||
# Dev and prod environments also use separate databases, modern_paste_dev and modern_paste, respectively.
|
||||
BUILD_ENVIRONMENT = constants.build_environment.PROD
|
||||
|
||||
# Option to use encrypted IDs rather than integer IDs
|
||||
# Set this to True if you want paste IDs to be encrypted, e.g. displayed as h0GZ19np17iT~CtpuIH3NcnRi-rYnlYzizqToCmG3BY=
|
||||
# If False, IDs will be displayed as regular, incrementing integers, e.g. 1, 2, 3, etc.
|
||||
USE_ENCRYPTED_IDS = True
|
||||
|
||||
# Choose to allow paste attachments
|
||||
# This will allow for users to attach files and images to pastes. If disabled, the MAX_ATTACHMENT_SIZE and
|
||||
# ATTACHMENTS_DIR configuration constants will be ignored.
|
||||
ENABLE_PASTE_ATTACHMENTS = False
|
||||
|
||||
# Allow only paste attachments below a certain size threshold, in MB
|
||||
# Set this to 0 for an unlimited file size.
|
||||
MAX_ATTACHMENT_SIZE = 5
|
||||
|
||||
# Location to store paste attachments
|
||||
# Please use an absolute path and ensure that it is writable by www-data.
|
||||
ATTACHMENTS_DIR = '/var/www/modern-paste-attachments'
|
||||
|
||||
# Choose to enable or disable user registration
|
||||
# If False, the web interface will not allow access to the user registration page. Additionally, the API endpoint
|
||||
# for creating new users will respond with an error.
|
||||
# This is useful for private or internal installations that aren't intended for public use.
|
||||
ENABLE_USER_REGISTRATION = False
|
||||
|
||||
# Choose to require users to be logged in to post pastes
|
||||
# If True, the web interface will allow access to the paste post interface only if the user is signed in. Additionally,
|
||||
# the API endpoint for creating new pastes will respond with an error if not authenticated with an API key tied to an
|
||||
# existing, active user.
|
||||
# This is useful for private or internal installations that aren't intended for public use.
|
||||
REQUIRE_LOGIN_TO_PASTE = False
|
||||
|
||||
# Authentication method
|
||||
# This selects between either local users or oidc (OpenID Connect)
|
||||
{% if env == 'staging' %}
|
||||
AUTH_METHOD = 'oidc'
|
||||
{% else %}
|
||||
AUTH_METHOD = 'local'
|
||||
{% endif %}
|
||||
|
||||
# OpenID Connect client secrets file
|
||||
AUTH_OIDC_CLIENT_SECRETS = '/etc/modern-paste/client_secrets.json'
|
||||
|
||||
# Required scope for OAuth2 API calls
|
||||
AUTH_OIDC_SCOPE = 'modernpaste'
|
||||
|
||||
# AES key for generating encrypted IDs
|
||||
# This is only relevant if USE_ENCRYPTED_IDS above is True. If not, this config parameter can be ignored.
|
||||
# It is recommended, but not strictly required, for you to replace the string below with the output of os.urandom(32),
|
||||
# so that the encrypted IDs generated for the app are specific to this installation.
|
||||
{% if env == 'staging' %}
|
||||
ID_ENCRYPTION_KEY = '6\x80\x18\xdc\xcf \xad\x14U\xa7\x05X\x7f\x81\x01\xd5\x19i\xf3S;\xcaL\xcf\xe2\x8d\x82\x1a\x12\xd9}\x8c'
|
||||
{% else %}
|
||||
ID_ENCRYPTION_KEY = '{{modernpaste_encryption_key}}'
|
||||
{% endif %}
|
||||
|
||||
# Flask session secret key
|
||||
# IMPORTANT NOTE: Open up a Python terminal, and replace the below with the output of os.urandom(32)
|
||||
# This secret key should be different for every installation of Modern Paste.
|
||||
{% if env == 'staging' %}
|
||||
FLASK_SECRET_KEY = '{{modernpaste_stg_session_key}}'
|
||||
{% else %}
|
||||
FLASK_SECRET_KEY = '{{modernpaste_session_key}}'
|
||||
{% endif %}
|
||||
|
||||
# Languages
|
||||
# A list of all languages you want to support with the app. Add 'text' for plain text support.
|
||||
# Only use strings from the directory app/static/build/lib/codemirror/mode
|
||||
LANGUAGES = [
|
||||
'text',
|
||||
'clike',
|
||||
'cmake',
|
||||
'css',
|
||||
'd',
|
||||
'diff',
|
||||
'dockerfile',
|
||||
'erlang',
|
||||
'go',
|
||||
'haskell',
|
||||
'htmlmixed',
|
||||
'javascript',
|
||||
'jinja2',
|
||||
'lua',
|
||||
'markdown',
|
||||
'perl',
|
||||
'php',
|
||||
'python',
|
||||
'rpm',
|
||||
'rst',
|
||||
'ruby',
|
||||
'rust',
|
||||
'shell',
|
||||
'sql',
|
||||
'swift',
|
||||
'xml',
|
||||
'yaml',
|
||||
]
|
|
@ -1,13 +0,0 @@
|
|||
import config
|
||||
import constants
|
||||
|
||||
{% if env == 'staging' %}
|
||||
SQLALCHEMY_DATABASE_URI = 'postgres://{{modernpaste_stg_db_user}}:{{modernpaste_stg_db_password}}@db01/modernpaste'
|
||||
{% else %}
|
||||
SQLALCHEMY_DATABASE_URI = 'postgres://{{modernpaste_db_user}}:{{modernpaste_db_password}}@db01/modernpaste'
|
||||
{% endif %}
|
||||
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||
|
||||
# Flask session secret key
|
||||
SECRET_KEY = config.FLASK_SECRET_KEY
|
|
@ -1,149 +0,0 @@
|
|||
WSGIDaemonProcess stickynotes2modernpaste user=apache group=apache threads=5
|
||||
WSGIScriptAlias /stickynotes2modernpaste /usr/share/stickynotes2modernpaste/stickynotes2modernpaste.wsgi
|
||||
WSGISocketPrefix run/wsgi
|
||||
|
||||
# Grab a cup of coffee, a light snack, and turn on some classical music.
|
||||
# You're in for a bit of a novel.
|
||||
#
|
||||
# The below rules are worthy of some comment so that later on when I (or
|
||||
# heaven forbid anyone else) have to revisit them for some horrible reason,
|
||||
# they can be referred to and maybe (but unlikely) useful.
|
||||
#
|
||||
# Chapter 1. Background.
|
||||
#
|
||||
# The rewrite rules exist solely for the purpose of continuing to support old
|
||||
# `fpaste` (the CLI app). This is in the process of being rewritten, and one
|
||||
# day we won't have to support it anymore. But for now, we do, because it's on
|
||||
# live media (and, I believe, Desktop installs, by default), and when a user is
|
||||
# having issues and asking for help in IRC, they need to be able to use
|
||||
# `fpaste` to do so. So, that is why we care about `fpaste` in its current
|
||||
# (F25-F26) form.
|
||||
#
|
||||
# You see, fpaste was written in such a way that it makes a lot of weird
|
||||
# assumptions that don't hold anymore. I will not speculate on why it was
|
||||
# written the way it was, but I _will_ briefly outline some of the intricacies
|
||||
# of supporting it.
|
||||
#
|
||||
# First off the workflow is something like this:
|
||||
# 1. User wants to paste some text. Who knows why they want to do this. Maybe
|
||||
# they are bored and want to see how broken our rewrite rules are. Maybe
|
||||
# they hate me and want to see me cry trying to fix them. Who knows?!
|
||||
#
|
||||
# 2. The fpaste client makes a POST on their behalf to /. This POST payload
|
||||
# includes the text of the paste and some other information (paste
|
||||
# language, etc).
|
||||
#
|
||||
# 3. The server sees the POST, matches it against our rules below, and
|
||||
# decides that it needs to redirect them to stickynotes2modernpaste, a
|
||||
# custom Flask app that I (relrod) wrote so that we could handle requests
|
||||
# that are in the form our old stickynotes pastebin accepted, and proxy
|
||||
# them to modernpaste.
|
||||
#
|
||||
# Note that this matches the first set of crazy RewriteConds below. We
|
||||
# only want to send CLI users there, and only when they POST to /. At
|
||||
# this point, at least.
|
||||
#
|
||||
# 4. sn2mp says "okay cool," proxies the paste to modernpaste via its JSON
|
||||
# API, and returns back to fpaste a JSON blob that contains JSON with two
|
||||
# keys that fpaste requires exists. In our response, one of them is always
|
||||
# an empty string, and the other is the id of the paste, prefixed with
|
||||
# "paste/".
|
||||
#
|
||||
# 5. At this point, fpaste has enough information to return a URL to the
|
||||
# paste. However, things are not all okay in the world. You see, fpaste
|
||||
# wants to show a short-url too. Apparently people don't like typing or
|
||||
# something. To generate a short-url, the fpaste client sends another POST
|
||||
# to us, at the path "/paste/[the paste id]//". In the past, when it would
|
||||
# do this, stickynotes would return a JSON blob that included the
|
||||
# short-url. In fact, it would always include the short-url at the
|
||||
# third-line from the last in its JSON response, and the fpaste client
|
||||
# hardcoded that assumption. See Chapter 2 for information about the "//".
|
||||
#
|
||||
# 6. When we get this second POST, we again send the client to sn2mp. We add
|
||||
# a few more crazy RewriteConds to ensure that we only add this behavior
|
||||
# for fpaste and not most users. We know paste IDs are 22-24 characters
|
||||
# long (as per https://github.com/LINKIWI/modern-paste/pull/33) and that
|
||||
# the client will always POST to "/paste/[the paste id]//". So we match on
|
||||
# that. If we match, sn2mp will take everything after its name and append
|
||||
# it to the URL that ultimately gets shipped to da.gd for shortening. Then
|
||||
# it returns a (malformed) JSON blob that is written in exactly the way
|
||||
# fpaste expects.
|
||||
#
|
||||
# 7. Then fpaste shows the user both URLs, and all is okay.
|
||||
#
|
||||
# Chapter 2. Trailing slashes.
|
||||
#
|
||||
# The fpaste client defaults to private mode, but modernpaste doesn't support
|
||||
# that, per se. You can password-protect pastes, but that's about it.
|
||||
#
|
||||
# However, they way stickynotes worked, it used /[paste id]/[secret] when a
|
||||
# paste was private. Since modernpaste does things differently, sn2mp never
|
||||
# returns the [secret] part of that URL. Or rather, it returns the empty string
|
||||
# in its place. This means, by default (private mode = true), fpaste will
|
||||
# both render, and internally use, a URL that has /[paste id]/[secret]. But
|
||||
# since [secret] is the empty string, this is equivalent to /[paste id]/, with
|
||||
# the trailing slash.
|
||||
#
|
||||
# To make matters worse, this little gem is found in the fpaste procedure for
|
||||
# doing the second POST (#5 and 6 above):
|
||||
#
|
||||
# eq = urllib.request.Request(url=long_url+'/', data=params.encode())
|
||||
#
|
||||
# Yep, it adds a '/' for the second POST. So we get POSTs to
|
||||
# /paste/[paste id]// during the second POST.
|
||||
#
|
||||
# Our capture of the paste ID below (the ".{22,24}" part) will match the first
|
||||
# trailing slash, but not the second (because of the /$ that comes after).
|
||||
# Nevertheless sn2mp handles all three cases anyway, and will STRIP OFF
|
||||
# trailing slashes if they occur 0, 1, or 2 times.
|
||||
#
|
||||
# Lastly, the long url that fpaste shows the user contains one trailing slash
|
||||
# (due to the /[secret] part from how stickynotes worked). So we add one final
|
||||
# rewrite that redirects users who go to that, to the non-slash version.
|
||||
#
|
||||
# If you have made it this far, you are a champion. You should get a badge.
|
||||
#
|
||||
# Warm regards and good luck,
|
||||
# relrod
|
||||
|
||||
RewriteEngine on
|
||||
#LogLevel alert rewrite:trace6
|
||||
|
||||
{% if env != 'staging' %}
|
||||
RewriteRule login / [L,R]
|
||||
RewriteRule archive /login/ [L,R]
|
||||
RewriteRule api/paste/recent /login/ [L,R]
|
||||
RewriteRule api/paste/top /login/ [L,R]
|
||||
{% endif %}
|
||||
|
||||
RewriteCond %{HTTP_USER_AGENT} ^fpaste\/0\.3.*$ [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Python\-urllib.*$
|
||||
RewriteCond %{REQUEST_METHOD} POST
|
||||
RewriteRule ^/$ /stickynotes2modernpaste/$1 [L,PT]
|
||||
|
||||
RewriteCond %{HTTP_USER_AGENT} ^fpaste\/0\.3.*$ [OR]
|
||||
RewriteCond %{HTTP_USER_AGENT} ^Python\-urllib.*$
|
||||
RewriteCond %{REQUEST_METHOD} POST
|
||||
RewriteRule ^/paste/(.{22,24})/$ /stickynotes2modernpaste/paste/$1 [L,PT]
|
||||
|
||||
# Otherwise, if we're given a URL with a trailing slash, kill it.
|
||||
RewriteRule ^/paste/([^/]{22,24})/$ /paste/$1 [R,L]
|
||||
|
||||
WSGIScriptAlias / /usr/share/modern-paste/modern_paste.wsgi
|
||||
|
||||
<Directory /usr/share/stickynotes2modernpaste>
|
||||
WSGIProcessGroup stickynotes2modernpaste
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIScriptReloading On
|
||||
Order deny,allow
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/modern-paste>
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
DocumentRoot /usr/share/modern-paste
|
||||
#ErrorLog logs/modern-paste-error.log
|
||||
#CustomLog logs/modern-paste-access.log combined
|
||||
#LogLevel info
|
|
@ -129,14 +129,6 @@ define service {
|
|||
use websitetemplate
|
||||
}
|
||||
|
||||
define service {
|
||||
hostgroup_name proxies
|
||||
service_description http-modernpaste
|
||||
check_command check_website_ssl!paste.fedoraproject.org!/!LOGIN
|
||||
max_check_attempts 8
|
||||
use websitetemplate
|
||||
}
|
||||
|
||||
##
|
||||
## Individual hosts
|
||||
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: BuildConfig
|
||||
metadata:
|
||||
name: "modernpaste-docker-build"
|
||||
labels:
|
||||
environment: "modernpaste"
|
||||
spec:
|
||||
runPolicy: Serial
|
||||
source:
|
||||
dockerfile: |-
|
||||
FROM fedora:27
|
||||
LABEL \
|
||||
name="Modern Paste" \
|
||||
vendor="Fedora Infrastructure" \
|
||||
license="MIT"
|
||||
RUN curl -o /etc/yum.repos.d/infra-stg.repo \
|
||||
https://infrastructure.fedoraproject.org/cgit/ansible.git/plain/files/common/fedora-infra-tags.repo
|
||||
RUN yum -y install modern-paste
|
||||
RUN yum -y install --setopt=tsflags=nodocs \
|
||||
python-gunicorn \
|
||||
python2-mock \
|
||||
python-psycopg2
|
||||
WORKDIR /usr/share/modern-paste
|
||||
RUN sed -i '216,219d;228,229d' app/api/paste.py
|
||||
RUN mv modern_paste.wsgi modern_paste_wsgi.py
|
||||
USER 1001
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT gunicorn --bind 0.0.0.0:8080 --access-logfile=- --chdir /usr/share/modern-paste modern_paste_wsgi:application
|
||||
strategy:
|
||||
type: Docker
|
||||
output:
|
||||
to:
|
||||
kind: ImageStreamTag
|
||||
name: inframodernpaste:latest
|
|
@ -1,72 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: DeploymentConfig
|
||||
metadata:
|
||||
name: "modernpaste-web"
|
||||
labels:
|
||||
environment: "modernpaste"
|
||||
service: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
environment: "modernpaste"
|
||||
service: web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
environment: "modernpaste"
|
||||
service: web
|
||||
spec:
|
||||
containers:
|
||||
- name: web
|
||||
image: 172.30.53.136:5000/modernpaste/inframodernpaste:latest
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/modern-paste
|
||||
readOnly: true
|
||||
- name: secret-volume
|
||||
mountPath: /etc/secret
|
||||
readOnly: true
|
||||
env:
|
||||
- name: ENCRYPTION_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "modernpaste-secret"
|
||||
key: encryption-key
|
||||
- name: SESSION_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "modernpaste-secret"
|
||||
key: session-key
|
||||
- name: DATABASE_URI
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "modernpaste-secret"
|
||||
key: database-uri
|
||||
#- name: DOMAIN
|
||||
# value: ${DOMAIN}
|
||||
readinessProbe:
|
||||
timeoutSeconds: 1
|
||||
initialDelaySeconds: 5
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8080
|
||||
livenessProbe:
|
||||
timeoutSeconds: 1
|
||||
initialDelaySeconds: 30
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8080
|
||||
resources:
|
||||
limits:
|
||||
memory: 384Mi
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: "modernpaste-configmap"
|
||||
- name: secret-volume
|
||||
secret:
|
||||
secretName: "modernpaste-secret"
|
||||
triggers:
|
||||
- type: ConfigChange
|
|
@ -1,6 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
labels:
|
||||
environment: "modernpaste"
|
||||
name: "inframodernpaste"
|
|
@ -1,15 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Route
|
||||
metadata:
|
||||
name: "modernpaste-web"
|
||||
labels:
|
||||
environment: "modernpaste"
|
||||
spec:
|
||||
port:
|
||||
targetPort: web
|
||||
to:
|
||||
kind: Service
|
||||
name: "modernpaste-web"
|
||||
tls:
|
||||
termination: edge
|
||||
insecureEdgeTerminationPolicy: Redirect
|
|
@ -1,14 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "modernpaste-web"
|
||||
labels:
|
||||
environment: "modernpaste"
|
||||
spec:
|
||||
selector:
|
||||
environment: "modernpaste"
|
||||
service: web
|
||||
ports:
|
||||
- name: web
|
||||
port: 8080
|
||||
targetPort: 8080
|
|
@ -1,93 +0,0 @@
|
|||
import constants
|
||||
import os
|
||||
|
||||
# Domain from which you will access this app
|
||||
# If running on a port other than 80, append it after a colon at the end of the domain, e.g. 'domain.com:8080'
|
||||
DOMAIN = "modernpaste-web-modernpaste.app.os.stg.fedoraproject.org"
|
||||
|
||||
# Use HTTPS by default?
|
||||
# This is only used for deciding whether to use the http:// or https:// prefix when constructing full URLs,
|
||||
# and is not related to your web server configuration.
|
||||
DEFAULT_HTTPS = True
|
||||
|
||||
# The type of build environment
|
||||
# build_environment.DEV won't minify CSS and Closure-compile JavaScript; build_environment.PROD will.
|
||||
# Dev and prod environments also use separate databases, modern_paste_dev and modern_paste, respectively.
|
||||
BUILD_ENVIRONMENT = constants.build_environment.PROD
|
||||
|
||||
# Option to use encrypted IDs rather than integer IDs
|
||||
# Set this to True if you want paste IDs to be encrypted, e.g. displayed as h0GZ19np17iT~CtpuIH3NcnRi-rYnlYzizqToCmG3BY=
|
||||
# If False, IDs will be displayed as regular, incrementing integers, e.g. 1, 2, 3, etc.
|
||||
USE_ENCRYPTED_IDS = True
|
||||
|
||||
# Choose to allow paste attachments
|
||||
# This will allow for users to attach files and images to pastes. If disabled, the MAX_ATTACHMENT_SIZE and
|
||||
# ATTACHMENTS_DIR configuration constants will be ignored.
|
||||
ENABLE_PASTE_ATTACHMENTS = False
|
||||
|
||||
# Allow only paste attachments below a certain size threshold, in MB
|
||||
# Set this to 0 for an unlimited file size.
|
||||
MAX_ATTACHMENT_SIZE = 5
|
||||
|
||||
# Location to store paste attachments
|
||||
# Please use an absolute path and ensure that it is writable by www-data.
|
||||
ATTACHMENTS_DIR = '/var/www/modern-paste-attachments'
|
||||
|
||||
# Choose to enable or disable user registration
|
||||
# If False, the web interface will not allow access to the user registration page. Additionally, the API endpoint
|
||||
# for creating new users will respond with an error.
|
||||
# This is useful for private or internal installations that aren't intended for public use.
|
||||
ENABLE_USER_REGISTRATION = False
|
||||
|
||||
# Choose to require users to be logged in to post pastes
|
||||
# If True, the web interface will allow access to the paste post interface only if the user is signed in. Additionally,
|
||||
# the API endpoint for creating new pastes will respond with an error if not authenticated with an API key tied to an
|
||||
# existing, active user.
|
||||
# This is useful for private or internal installations that aren't intended for public use.
|
||||
REQUIRE_LOGIN_TO_PASTE = False
|
||||
|
||||
# AES key for generating encrypted IDs
|
||||
# This is only relevant if USE_ENCRYPTED_IDS above is True. If not, this config parameter can be ignored.
|
||||
# It is recommended, but not strictly required, for you to replace the string below with the output of os.urandom(32),
|
||||
# so that the encrypted IDs generated for the app are specific to this installation.
|
||||
#ID_ENCRYPTION_KEY = os.environ.get('ENCRYPTION_KEY')
|
||||
ID_ENCRYPTION_KEY = '{{modernpaste_stg_encryption_key}}'
|
||||
|
||||
# Flask session secret key
|
||||
# IMPORTANT NOTE: Open up a Python terminal, and replace the below with the output of os.urandom(32)
|
||||
# This secret key should be different for every installation of Modern Paste.
|
||||
#FLASK_SECRET_KEY = os.environ.get('SECRET_KEY')
|
||||
FLASK_SECRET_KEY = '{{modernpaste_stg_session_key}}'
|
||||
|
||||
# Languages
|
||||
# A list of all languages you want to support with the app. Add 'text' for plain text support.
|
||||
# Only use strings from the directory app/static/build/lib/codemirror/mode
|
||||
LANGUAGES = [
|
||||
'text',
|
||||
'clike',
|
||||
'cmake',
|
||||
'css',
|
||||
'd',
|
||||
'diff',
|
||||
'dockerfile',
|
||||
'erlang',
|
||||
'go',
|
||||
'haskell',
|
||||
'htmlmixed',
|
||||
'javascript',
|
||||
'jinja2',
|
||||
'lua',
|
||||
'markdown',
|
||||
'perl',
|
||||
'php',
|
||||
'python',
|
||||
'rpm',
|
||||
'rst',
|
||||
'ruby',
|
||||
'rust',
|
||||
'shell',
|
||||
'sql',
|
||||
'swift',
|
||||
'xml',
|
||||
'yaml',
|
||||
]
|
|
@ -1,12 +0,0 @@
|
|||
{% macro load_file(filename) %}{% include filename %}{%- endmacro -%}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: "modernpaste-configmap"
|
||||
labels:
|
||||
environment: "modernpaste"
|
||||
data:
|
||||
flask_config.py: |-
|
||||
{{ load_file('flask_config.py') | indent }}
|
||||
config.py: |-
|
||||
{{ load_file('config.py') | indent }}
|
|
@ -1,7 +0,0 @@
|
|||
import config
|
||||
import constants
|
||||
import os
|
||||
|
||||
SQLALCHEMY_DATABASE_URI = "postgres://{{modernpaste_stg_db_user}}:{{modernpaste_stg_db_password}}@db01.stg.phx2.fedoraproject.org/modernpaste"
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||
SECRET_KEY = config.FLASK_SECRET_KEY
|
|
@ -1,10 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: "modernpaste-secret"
|
||||
labels:
|
||||
environment: "modernpaste"
|
||||
stringData:
|
||||
encryption-key: "{{modernpaste_stg_encryption_key}}"
|
||||
session-key: "{{modernpaste_stg_session_key}}"
|
||||
database-uri: "postgres://{{modernpaste_stg_db_user}}:{{modernpaste_stg_db_password}}@db01.stg.phx2.fedoraproject.org/modernpaste"
|
|
@ -1,40 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Sticky Notes pastebin
|
||||
* @ver 0.3
|
||||
* @license BSD License - www.opensource.org/licenses/bsd-license.php
|
||||
*
|
||||
* Copyright (c) 2012 Sayak Banerjee <sayakb@kde.org>
|
||||
* Copyright (c) 2013 Athmane Madjoudj <athmane@fedoraproject.org>
|
||||
* All rights reserved. Do not remove this copyright notice.
|
||||
*/
|
||||
|
||||
/**
|
||||
* URL shortener using ur1.ca from Indenti.ca
|
||||
**/
|
||||
class URLShortener
|
||||
{
|
||||
public function shorten($long_url)
|
||||
{
|
||||
// Don't shorten private pastes.
|
||||
if(preg_match('/^http(s)?:\/\/(.+).fedoraproject.org\/(\d+)\/(\d+)\/$/', $long_url)) {
|
||||
return $long_url;
|
||||
}
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL,"https://da.gd/s?strip");
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('url' => $long_url)));
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 2);
|
||||
$result = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
if (!empty($result))
|
||||
return $result;
|
||||
else
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -1,279 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Sticky Notes pastebin
|
||||
* @ver 0.3
|
||||
* @license BSD License - www.opensource.org/licenses/bsd-license.php
|
||||
*
|
||||
* Copyright (c) 2012 Sayak Banerjee <sayakb@kde.org>
|
||||
* Copyright (c) 2013 Athmane Madjoudj <athmane@fedoraproject.org>
|
||||
* All rights reserved. Do not remove this copyright notice.
|
||||
*/
|
||||
|
||||
// Invoke required files
|
||||
include_once('init.php');
|
||||
|
||||
// Collect some data
|
||||
$paste_id = $core->variable('id', 0);
|
||||
$hash = $core->variable('hash', 0);
|
||||
$mode = $core->variable('mode', '');
|
||||
$project = $core->variable('project', '');
|
||||
$password = $core->variable('password', '');
|
||||
$sid = $core->variable('session_id_' . $paste_id, '', true);
|
||||
$mode = strtolower($mode);
|
||||
|
||||
// Password exempt
|
||||
$exempt = false;
|
||||
|
||||
// Trim trailing /
|
||||
if (strrpos($password, '/') == strlen($password) - 1)
|
||||
{
|
||||
$password = substr($password, 0, strlen($password) - 1);
|
||||
}
|
||||
|
||||
if (empty($mode))
|
||||
{
|
||||
$mode = $core->variable('format', '');
|
||||
$_GET['mode'] = $mode;
|
||||
}
|
||||
|
||||
// Check for mode validity
|
||||
if ($mode && $mode != 'raw' && $mode != 'xml' && $mode != 'json')
|
||||
{
|
||||
die;
|
||||
}
|
||||
|
||||
// Initialize the skin file
|
||||
if ($mode != 'raw')
|
||||
{
|
||||
$skin->init('tpl_show');
|
||||
}
|
||||
|
||||
// We want paste id
|
||||
if ($paste_id == 0)
|
||||
{
|
||||
$core->redirect($core->path() . 'all/');
|
||||
}
|
||||
|
||||
// Escape the paste id
|
||||
$db->escape($paste_id);
|
||||
|
||||
// Get the paste data
|
||||
$sql = "SELECT * FROM {$db->prefix}main WHERE id = {$paste_id} LIMIT 1";
|
||||
$row = $db->query($sql, true);
|
||||
|
||||
// Check if something was returned
|
||||
if ($row == null)
|
||||
{
|
||||
if ($mode == 'xml' || $mode == 'json')
|
||||
{
|
||||
$skin->assign('error_message', 'err_not_found');
|
||||
echo $skin->output("api_error.{$mode}");
|
||||
die;
|
||||
}
|
||||
else if ($mode == 'raw')
|
||||
{
|
||||
die($lang->get('error_404'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$skin->assign(array(
|
||||
'error_text' => $lang->get('error_404'),
|
||||
'data_visibility' => 'hidden',
|
||||
));
|
||||
|
||||
$skin->kill();
|
||||
}
|
||||
}
|
||||
|
||||
// Is it a private paste?
|
||||
if ($row['private'] == "1")
|
||||
{
|
||||
if (empty($hash) || $row['hash'] != $hash)
|
||||
{
|
||||
if ($mode == 'xml' || $mode == 'json')
|
||||
{
|
||||
$skin->assign('error_message', 'err_invalid_hash');
|
||||
echo $skin->output("api_error.{$mode}");
|
||||
die;
|
||||
}
|
||||
else if ($mode == 'raw')
|
||||
{
|
||||
die($lang->get('error_hash'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$skin->assign(array(
|
||||
'error_text' => $lang->get('error_hash'),
|
||||
'data_visibility' => 'hidden',
|
||||
));
|
||||
|
||||
$skin->kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check if password cookie is there
|
||||
if (!empty($row['password']) && !empty($sid))
|
||||
{
|
||||
// Escape the session id
|
||||
$db->escape($sid);
|
||||
|
||||
// Clean up the session data every 30 seconds
|
||||
if (time() % 30 == 0)
|
||||
{
|
||||
$age = time() - 1200;
|
||||
$db->query("DELETE FROM {$db->prefix}session " .
|
||||
"WHERE timestamp < {$age}");
|
||||
}
|
||||
|
||||
$pass_data = $db->query("SELECT sid FROM {$db->prefix}session " .
|
||||
"WHERE sid = '{$sid}'", true);
|
||||
|
||||
if (!empty($pass_data['sid']))
|
||||
{
|
||||
$exempt = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Is it password protected?
|
||||
if (!empty($row['password']) && empty($password) && !$exempt)
|
||||
{
|
||||
if ($mode == 'xml' || $mode == 'json')
|
||||
{
|
||||
$skin->assign('error_message', 'err_password_required');
|
||||
echo $skin->output("api_error.{$mode}");
|
||||
die;
|
||||
}
|
||||
else if ($mode == 'raw')
|
||||
{
|
||||
die($lang->get('err_passreqd'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$skin->init('tpl_show_password');
|
||||
$skin->title("#{$row['id']} • " . $lang->get('site_title'));
|
||||
$skin->output();
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Check password
|
||||
if (!empty($row['password']) && !empty($password) && !$exempt)
|
||||
{
|
||||
$check = sha1(sha1($password) . $row['salt']);
|
||||
|
||||
if ($check != $row['password'])
|
||||
{
|
||||
if ($mode == 'xml' || $mode == 'json')
|
||||
{
|
||||
$skin->assign('error_message', 'err_invalid_password');
|
||||
echo $skin->output("api_error.{$mode}");
|
||||
die;
|
||||
}
|
||||
else if ($mode == 'raw')
|
||||
{
|
||||
die($lang->get('invalid_password'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$skin->assign(array(
|
||||
'error_text' => $lang->get('invalid_password'),
|
||||
'data_visibility' => 'hidden',
|
||||
));
|
||||
|
||||
$skin->kill();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Create a session
|
||||
$sid = sha1(time() . $core->remote_ip());
|
||||
|
||||
$core->set_cookie('session_id_' . $paste_id, $sid);
|
||||
$db->query("INSERT INTO {$db->prefix}session " .
|
||||
"(sid, timestamp) VALUES ('{$sid}', " . time() . ")");
|
||||
}
|
||||
}
|
||||
|
||||
// Is it raw? just dump the code then
|
||||
if ($mode == 'raw')
|
||||
{
|
||||
header('Content-type: text/plain; charset=UTF-8');
|
||||
header('Content-Disposition: inline; filename="pastedata"');
|
||||
|
||||
echo $row['data'];
|
||||
exit;
|
||||
}
|
||||
|
||||
// Prepare GeSHi
|
||||
$geshi = new GeSHi($row['data'], $row['language']);
|
||||
$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 2);
|
||||
$geshi->set_header_type(GESHI_HEADER_DIV);
|
||||
//$geshi->set_line_style('background: #f7f7f7; text-shadow: 0px 1px #fff; padding: 1px;',
|
||||
// 'background: #fbfbfb; text-shadow: 0px 1px #fff; padding: 1px;');
|
||||
$geshi->set_overall_style('word-wrap:break-word;');
|
||||
|
||||
// Generate the data
|
||||
$user = empty($row['author']) ? $lang->get('anonymous') : htmlspecialchars($row['author']);
|
||||
$time = date('d M Y, h:i:s e', $row['timestamp']);
|
||||
$info = $lang->get('posted_info');
|
||||
|
||||
$info = preg_replace('/\_\_user\_\_/', $user, $info);
|
||||
$info = preg_replace('/\_\_time\_\_/', $time, $info);
|
||||
|
||||
// Before we display, we need to escape the data from the skin/lang parsers
|
||||
$code_data = (empty($mode) ? $geshi->parse_code() : htmlspecialchars($row['data']));
|
||||
|
||||
$lang->escape($code_data);
|
||||
$skin->escape($code_data);
|
||||
|
||||
// Fix JSON rendering. The JSON spec disallows newlines in string literals
|
||||
// https://www.ietf.org/rfc/rfc4627.txt :
|
||||
// "All Unicode characters may be placed within the
|
||||
// quotation marks except for the characters that must be escaped:
|
||||
// quotation mark, reverse solidus, and the control characters (U+0000
|
||||
// through U+001F)."
|
||||
// ... and since \n is a control character, sticky-notes putting newlines in
|
||||
// string literals (unescaped) breaks spec.
|
||||
if ($mode && $mode == 'json') {
|
||||
$code_data = str_replace("\n", "\\n", $code_data);
|
||||
}
|
||||
|
||||
// Shorten the current URL
|
||||
$url_shortener = new URLShortener();
|
||||
$short_url = $url_shortener->shorten($nav->get_paste($row['id'], $hash, $project, true, ''));
|
||||
|
||||
// Assign template variables
|
||||
$skin->assign(array(
|
||||
'paste_id' => $row['id'],
|
||||
'paste_data' => $code_data,
|
||||
'paste_lang' => htmlspecialchars($row['language']),
|
||||
'paste_info' => $info,
|
||||
'paste_user' => $user,
|
||||
'paste_timestamp' => $row['timestamp'],
|
||||
'raw_url' => $nav->get_paste($row['id'], $hash, $project, false, 'raw'),
|
||||
'share_url' => urlencode($core->base_uri()),
|
||||
'share_title' => urlencode($lang->get('paste') . ' #' . $row['id']),
|
||||
'error_visibility' => 'hidden',
|
||||
'geshi_stylesheet' => $geshi->get_stylesheet(),
|
||||
'short_url' => $short_url,
|
||||
));
|
||||
|
||||
// Let's output the page now
|
||||
$skin->title("#{$row['id']} • " . $lang->get('site_title'));
|
||||
|
||||
if ($mode == 'raw')
|
||||
{
|
||||
$skin->output(false, true);
|
||||
}
|
||||
else if ($mode)
|
||||
{
|
||||
echo $skin->output("api_show.{$mode}");
|
||||
}
|
||||
else
|
||||
{
|
||||
$skin->output();
|
||||
}
|
||||
|
||||
?>
|
|
@ -1,561 +0,0 @@
|
|||
/*
|
||||
Fedora pastebin styling, based on Koji styling
|
||||
Copyright (c) 2007,2008, 2009, 2012 Red Hat, Inc.
|
||||
|
||||
Authors:
|
||||
Athmane Madjoudj <athmane@fedoraproject.org>
|
||||
|
||||
Original Authors:
|
||||
Mike Bonnet <mikeb@redhat.com>
|
||||
Mike McLean <mikem@redhat.com>
|
||||
Dennis Gilmore <dennis@ausil.us>
|
||||
*/
|
||||
|
||||
html {
|
||||
min-width: 800px;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: small;
|
||||
font-family: "Liberation Sans","Lucida Grande", "Luxi Sans", "Bitstream Vera Sans", helvetica, verdana, arial, sans-serif;
|
||||
color: #666;
|
||||
background: #fff url(../images/header-bg.png) repeat-x;
|
||||
}
|
||||
|
||||
a, a:visited, a:hover {
|
||||
color: #0066CC;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h4
|
||||
{
|
||||
font-size:19px;
|
||||
margin-bottom:14px;
|
||||
}
|
||||
|
||||
#wrap {
|
||||
min-width: 750px;
|
||||
max-width:1100px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#innerwrap {
|
||||
position:relative;
|
||||
}
|
||||
|
||||
#header {
|
||||
height:87px
|
||||
}
|
||||
|
||||
|
||||
#fpasteLogo {
|
||||
display:inline-block;
|
||||
padding-top:8px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
div#content {
|
||||
margin: 0 20px;
|
||||
margin-top:30px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
p#footer {
|
||||
padding-top: 40px;
|
||||
margin-left: 15px;
|
||||
line-height: 1.5em;
|
||||
color: #999;
|
||||
font-size: xx-small;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
p#footer a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.disabled {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
#mainNav {
|
||||
font-size:16px;
|
||||
font-weight:bold;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
#mainNav ul {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#mainNav ul li {
|
||||
|
||||
float: left;
|
||||
|
||||
}
|
||||
|
||||
#mainNav ul li a {
|
||||
display: block;
|
||||
color: rgba(255,255,255,0.8);
|
||||
text-decoration: none;
|
||||
padding: 0.5em 1.5em;
|
||||
font-size: 0.77em;
|
||||
height: 1.5em;
|
||||
}
|
||||
|
||||
#mainNav ul li:hover {
|
||||
-webkit-border-top-left-radius: 5px;
|
||||
-webkit-border-top-right-radius: 5px;
|
||||
-moz-border-radius-topleft: 5px;
|
||||
-moz-border-radius-topright: 5px;
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
background-color:rgba(255,255,255,0.1);
|
||||
}
|
||||
|
||||
body#summary #mainNav li#summaryTab a,
|
||||
body#tasks #mainNav li#tasksTab a,
|
||||
body#tags #mainNav li#tagsTab a,
|
||||
body#builds #mainNav li#buildsTab a,
|
||||
body#packages #mainNav li#packagesTab a,
|
||||
body#users #mainNav li#usersTab a,
|
||||
body#hosts #mainNav li#hostsTab a,
|
||||
body#buildtargets #mainNav li#buildtargetsTab a,
|
||||
body#reports #mainNav li#reportsTab a,
|
||||
body#search #mainNav li#searchTab a {
|
||||
background-color: #fff;
|
||||
color: #444;
|
||||
-webkit-border-top-left-radius: 5px;
|
||||
-webkit-border-top-right-radius: 5px;
|
||||
-moz-border-radius-topleft: 5px;
|
||||
-moz-border-radius-topright: 5px;
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
}
|
||||
|
||||
table {
|
||||
border-spacing: 0px;
|
||||
}
|
||||
|
||||
th {
|
||||
font-weight: bold;
|
||||
vertical-align: text-top;
|
||||
min-width: 100px;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
td
|
||||
{
|
||||
padding-left:15px;
|
||||
}
|
||||
|
||||
th, td {
|
||||
line-height:19px;
|
||||
}
|
||||
|
||||
td.building {
|
||||
color: #cc0;
|
||||
width:45px;
|
||||
}
|
||||
|
||||
td.complete {
|
||||
color: #0c0;
|
||||
width:45px;
|
||||
}
|
||||
|
||||
td.deleted,
|
||||
td.failed,
|
||||
td.canceled {
|
||||
color: #c00;
|
||||
width:45px;
|
||||
}
|
||||
|
||||
td.false {
|
||||
color: #c00;
|
||||
}
|
||||
|
||||
td.true {
|
||||
color: #0c0;
|
||||
}
|
||||
|
||||
img.sort {
|
||||
/* used for up/down sort arrows*/
|
||||
vertical-align: baseline;
|
||||
width: 10px;
|
||||
height: 9px;
|
||||
}
|
||||
|
||||
td.paginate {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
form.pageJump {
|
||||
float: right;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
form.pageJump select {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
div.dataHeader {
|
||||
font-weight: bold;
|
||||
font-size:17px;
|
||||
line-height:28px;
|
||||
padding-bottom:4px;
|
||||
}
|
||||
|
||||
div.pageHeader {
|
||||
margin-bottom: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 19px;
|
||||
}
|
||||
|
||||
table.nested {
|
||||
float: left;
|
||||
}
|
||||
|
||||
td.container {
|
||||
/*padding: 4px 0px;*/
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.nested th,
|
||||
table.nested td {
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
div.toggle {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
td.tree {
|
||||
|
||||
}
|
||||
|
||||
.tree span.root {
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
.tree ul {
|
||||
padding-left: 2em;
|
||||
list-style: none;
|
||||
margin-top: 0em;
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
.tree span.treeBranch {
|
||||
border-bottom: 1px solid #000;
|
||||
border-left: 1px solid #000;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.tree li.sibling > span.treeBranch {
|
||||
border-left-width: 0em;
|
||||
}
|
||||
|
||||
.tree li.sibling {
|
||||
border-left: 1px solid #000;
|
||||
}
|
||||
|
||||
.tree a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.tree span.treeLabel {
|
||||
position: relative;
|
||||
top: 0.6em;
|
||||
margin-left: 1.2em;
|
||||
padding-left: 0.2em;
|
||||
|
||||
font-size: 0.83em;
|
||||
}
|
||||
|
||||
.tree > ul {
|
||||
padding-bottom: 0.6em;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tree span.treeToggle {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tree span.treeLink {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.adminLink {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
img.stateimg {
|
||||
margin-top: -6px;
|
||||
margin-bottom: -6px;
|
||||
}
|
||||
|
||||
.charlist {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img.graphrow {
|
||||
background-color: #00f;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
table.data-list {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.data-list td {
|
||||
vertical-align: text-top;
|
||||
padding-left:3px;
|
||||
}
|
||||
|
||||
tr.list-header {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
tr.list-header th {
|
||||
background-color: #eee;
|
||||
box-shadow: 0 -1px 0 #ddd, 0 1px 0 #ddd;
|
||||
text-align:left;
|
||||
padding-left:4px;
|
||||
}
|
||||
|
||||
tr.list-header th {
|
||||
min-width:1px;
|
||||
}
|
||||
|
||||
table.nested th
|
||||
{
|
||||
min-width:1px;
|
||||
}
|
||||
|
||||
tr.row-even,
|
||||
tr.row-odd
|
||||
{
|
||||
box-shadow: 0 1px 0 #ddd;
|
||||
}
|
||||
|
||||
tr.row-even td,
|
||||
tr.row-odd td
|
||||
{
|
||||
padding-left:4px;
|
||||
}
|
||||
|
||||
tr.row-odd td:first-child,
|
||||
tr.row-even td:first-child
|
||||
{
|
||||
box-shadow: -1px 0 0 #ddd;
|
||||
}
|
||||
|
||||
tr.row-odd td:last-child,
|
||||
tr.row-even td:last-child {
|
||||
box-shadow: 1px 0 0 #ddd;
|
||||
}
|
||||
|
||||
tr.list-header th:first-child
|
||||
{
|
||||
box-shadow: -1px 0 0 #ddd,0 -1px 0 #ddd, 0 1px 0 #ddd;
|
||||
}
|
||||
|
||||
tr.list-header th:last-child
|
||||
{
|
||||
box-shadow: 1px 0 0 #ddd,0 -1px 0 #ddd, 0 1px 0 #ddd;
|
||||
}
|
||||
|
||||
tr.row-even td.tree {
|
||||
|
||||
}
|
||||
|
||||
tr.row-even td.tree span.treeLabel {
|
||||
|
||||
}
|
||||
|
||||
.taskfree, .taskfree:visited, .taskfree:hover {
|
||||
color: #3300CC;
|
||||
background-color:#fff;
|
||||
}
|
||||
.taskopen, .taskopen:visited, .taskopen:hover {
|
||||
color: #FF6600;
|
||||
background-color:#fff;
|
||||
}
|
||||
.taskclosed, .taskclosed:visited, .taskclosed:hover {
|
||||
color: #00CC00;
|
||||
background-color:#fff;
|
||||
}
|
||||
.taskcanceled, .taskcanceled:visited, .taskcanceled:hover {
|
||||
color: #CC9900;
|
||||
background-color:#fff;
|
||||
}
|
||||
.taskassigned, .taskassigned:visited, .taskassigned:hover {
|
||||
color: #CC00FF;
|
||||
background-color:#fff;
|
||||
}
|
||||
.taskfailed, .taskfailed:visited, .taskfailed:hover {
|
||||
color: #CC0000;
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
a.help {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
abbr {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.changelog {
|
||||
font-family: monospace;
|
||||
font-size: medium;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
#headerHelp {
|
||||
float: right;
|
||||
margin: 15px 10px 0 0;
|
||||
}
|
||||
|
||||
.filterlist {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
span#loginInfo {
|
||||
background-color: #ccc;
|
||||
font-weight: bold;
|
||||
padding: 3px 15px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
-webkit-border-bottom-left-radius: 3px;
|
||||
-webkit-border-bottom-right-radius: 3px;
|
||||
-moz-border-radius-bottomleft: 3px;
|
||||
-moz-border-radius-bottomright: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
box-shadow: 0 10px 10px rgba(255, 255, 255, 0.5) inset, 0 1px 3px rgba(0, 0, 0, 0.5);
|
||||
-mox-box-shadow: 0 10px 10px rgba(255, 255, 255, 0.5) inset, 0 1px 3px rgba(0, 0, 0, 0.5);
|
||||
-webkit-box-shadow: 0 10px 10px rgba(255, 255, 255, 0.5) inset, 0 1px 3px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.smaller {
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.rpmheader {
|
||||
/*font-family: monospace;
|
||||
font-size: medium;
|
||||
white-space: pre;*/
|
||||
}
|
||||
|
||||
.error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 1px solid #ccc;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#paste_data {
|
||||
background: none repeat scroll 0 0 #FFFFFF;
|
||||
border: 2px solid #CCCCCC;
|
||||
min-height: 300px;
|
||||
width: 1000px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.pre-cache {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.span6, .span6_2 {
|
||||
width: 600px;
|
||||
background-color: #dfe0e3;
|
||||
font-weight: bold;
|
||||
padding: 5px 15px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.span6_2 {
|
||||
width: 730px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#paste_lang {
|
||||
margin-left: 30px
|
||||
}
|
||||
|
||||
#paste_expire {
|
||||
margin-left: 180px;
|
||||
}
|
||||
|
||||
#label_paste_private {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#paste_button, .btn, .page_no {
|
||||
margin-left: 60px;
|
||||
background: #234f8c;
|
||||
color: #fff;
|
||||
border: 1px solid #234f8c;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
width: 100px;
|
||||
padding: 7px;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn, .page_no {
|
||||
padding: 5px;
|
||||
margin-left: 5px;
|
||||
padding: 5px;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.page_current {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.btn:hover, a.btn:visited {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.codewrap, .codewrap_small {
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.codewrap li:hover {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
|
||||
.pasteinfo {
|
||||
padding-bottom: 50px;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
<div class="row">
|
||||
<div class="span6 [[error_box]]">
|
||||
<label for="paste_user">{{your_alias}}</label>
|
||||
<input id="paste_user" name="paste_user" type="text" value="[[post_user]]"
|
||||
size="20" maxlength="50" />
|
||||
<div class="help-inline [[error_visibility]]">{{author_numeric}}</div>
|
||||
<div id="paste_user_default" class="hidden">{{anonymous}}</div>
|
||||
|
||||
<label for="paste_lang" id="paste_lang">{{language}}</label>
|
||||
<select id="paste_lang" name="paste_lang" class="monospace">
|
||||
[[post_lang_list]]
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<textarea id="paste_data" class="span12 codebox" name="paste_data" rows="" cols="">[[post_data]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<div class="span_6_1">
|
||||
<span class="span6_2">
|
||||
<label for="paste_password">{{password}}</label>
|
||||
<input id="paste_password" name="paste_password" type="password" size="20" maxlength="50" />
|
||||
<label for="paste_private" class="checkbox" id="label_paste_private">
|
||||
<input id="paste_private" name="paste_private" type="checkbox" checked="yes" [[post_checked]] />
|
||||
{{private_paste}}
|
||||
</label>
|
||||
|
||||
<select id="paste_expire" name="paste_expire">
|
||||
<option value="1800">{{del_30min}}</option>
|
||||
<option value="21600">{{del_6hrs}}</option>
|
||||
<option value="86400">{{del_1day}}</option>
|
||||
<option value="604800">{{del_1week}}</option>
|
||||
<option value="2592000" selected="selected">{{del_1month}}</option>
|
||||
<option value="0">{{keep_forever}}</option>
|
||||
</select>
|
||||
|
||||
</span>
|
||||
<input id="paste_button" type="submit" name="paste_submit" value="{{paste}}" />
|
||||
</div>
|
||||
</div>
|
|
@ -1,43 +0,0 @@
|
|||
<h1>
|
||||
<img src="[[skin_path]]/images/about.png" alt="" />
|
||||
{{site_name}} • {{about}}
|
||||
</h1>
|
||||
<br />
|
||||
|
||||
{{powered_by}}
|
||||
<br /><br />
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<ul class="unstyled">
|
||||
<li>
|
||||
{{project_home}}
|
||||
<a href="http://gitorious.org/sticky-notes" rel="nofollow">
|
||||
http://gitorious.org/sticky-notes
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{developed_by}}
|
||||
<a href="http://www.sayakbanerjee.com">Sayak Banerjee</a>
|
||||
</li>
|
||||
<li>
|
||||
{{license}}
|
||||
<a href="http://www.opensource.org/licenses/bsd-license.php" rel="nofollow">
|
||||
{{bsd_license}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="span6">
|
||||
<ul class="unstyled">
|
||||
<li>
|
||||
{{build}} [[site_build]]
|
||||
</li>
|
||||
<li>
|
||||
{{theme_name}} [[skin_name]]
|
||||
</li>
|
||||
<li>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -1,145 +0,0 @@
|
|||
<h1>
|
||||
<img src="[[skin_path]]/images/api.png" alt="" />
|
||||
{{site_name}} • {{api}}
|
||||
</h1>
|
||||
<br />
|
||||
|
||||
<div class="row align-center">
|
||||
<div class="span6">
|
||||
<div class="thumbnail pull-center">
|
||||
<img src="[[skin_path]]/images/xml.png" alt="" />
|
||||
<div class="caption">{{xml_caption}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<div class="thumbnail pull-center">
|
||||
<img src="[[skin_path]]/images/json.png" alt="" />
|
||||
<div class="caption">{{json_caption}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="whitebox whitebox_nomargin">
|
||||
{{doc_api_para1}}
|
||||
<ul class="lessmargin">
|
||||
<li><a href="#create">{{api_lcase}}/{{create_lcase}}</a></li>
|
||||
<li><a href="#show">{{api_lcase}}/{{show_lcase}}</a></li>
|
||||
<li><a href="#list">{{api_lcase}}/{{list_lcase}}</a></li>
|
||||
</ul>
|
||||
{{doc_api_para2}}
|
||||
<br />
|
||||
{{doc_api_para3}}
|
||||
<hr />
|
||||
|
||||
<h3>{{api}} → {{create}}</h3>
|
||||
{{doc_api_para4}}
|
||||
<br /><br />
|
||||
|
||||
<h4>{{mandatory_params}}</h4>
|
||||
<ul class="lessmargin">
|
||||
<li><i>paste_data</i> - {{paste_text}}</li>
|
||||
<li><i>paste_lang</i> - {{paste_language}}</li>
|
||||
<li><i>api_submit</i> - {{set_this_value}}</li>
|
||||
<li><i>mode</i> - {{mode_xml_json}}</li>
|
||||
</ul>
|
||||
|
||||
<h4>{{optional_params}}</h4>
|
||||
<ul class="lessmargin">
|
||||
<li><i>paste_user</i> - {{paste_author}}</li>
|
||||
<li><i>paste_password</i> - {{paste_pwd}}</li>
|
||||
<li><i>paste_private</i> - {{paste_pvt}}</li>
|
||||
<li><i>paste_expire</i> - {{paste_exptime}}</li>
|
||||
<li><i>paste_project</i> - {{paste_proj}}</li>
|
||||
</ul>
|
||||
{{language_list_exp}}
|
||||
<br /><br />
|
||||
|
||||
<h4>{{return_success}}</h4>
|
||||
<ul class="lessmargin">
|
||||
<li><i>id</i> - {{id_of_paste}}</li>
|
||||
<li><i>hash</i> - {{hash_of_paste}}</li>
|
||||
</ul>
|
||||
{{url_format_exp}}
|
||||
<br /><br />
|
||||
|
||||
<h4>{{return_error}}</h4>
|
||||
{{error_ret_exp}}
|
||||
<ul class="lessmargin">
|
||||
<li><i>err_nothing_to_do</i> - {{err_ntd}}</li>
|
||||
<li><i>err_author_numeric</i> - {{err_anum}}</li>
|
||||
<li><i>err_save_error</i> - {{err_save}}</li>
|
||||
<li><i>err_spamguard_ipban</i> - {{err_sg_ipban}}</li>
|
||||
<li><i>err_spamguard_stealth</i> - {{err_sg_stealth}}</li>
|
||||
<li><i>err_spamguard_noflood</i> - {{err_sg_noflood}}</li>
|
||||
<li><i>err_spamguard_php</i> - {{err_sg_php}}</li>
|
||||
</ul>
|
||||
<hr />
|
||||
|
||||
<h3>{{api}} → {{show}}</h3>
|
||||
{{doc_api_para5}}
|
||||
<br /><br />
|
||||
|
||||
{{doc_api_para6}}<br />
|
||||
{{doc_api_para7}}
|
||||
<br /><br />
|
||||
|
||||
<h4>{{mandatory_params}}</h4>
|
||||
<ul class="lessmargin">
|
||||
<li><i>id</i> - {{id_of_paste}}</li>
|
||||
<li><i>format</i> - {{result_format_exp}}</li>
|
||||
</ul>
|
||||
|
||||
<h4>{{optional_params}}</h4>
|
||||
<ul class="lessmargin">
|
||||
<li><i>hash</i> - {{hash_of_paste}}</li>
|
||||
<li><i>password</i> - {{password_of_paste}}</li>
|
||||
</ul>
|
||||
|
||||
<h4>{{return_success}}</h4>
|
||||
<ul class="lessmargin">
|
||||
<li><i>id</i> - {{id_of_paste}}</li>
|
||||
<li><i>author</i> - {{paste_author_exp}}</li>
|
||||
<li><i>timestamp</i> - {{paste_timestamp}}</li>
|
||||
<li><i>language</i> - {{paste_lang_exp}}</li>
|
||||
<li><i>data</i> - {{paste_text_exp}}</li>
|
||||
</ul>
|
||||
|
||||
<h4>{{return_error}}</h4>
|
||||
{{error_ret_exp}}
|
||||
<ul class="lessmargin">
|
||||
<li><i>err_not_found</i> - {{err_404}}</li>
|
||||
<li><i>err_invalid_hash</i> - {{err_invhash}}</li>
|
||||
<li><i>err_password_required</i> - {{err_passreqd}}</li>
|
||||
<li><i>err_invalid_password</i> - {{err_passwrng}}</li>
|
||||
</ul>
|
||||
<hr />
|
||||
|
||||
<h3>{{api}} → {{list}}</h3>
|
||||
{{doc_api_para8}}
|
||||
<br /><br />
|
||||
|
||||
<h4>{{mandatory_params}}</h4>
|
||||
<ul class="lessmargin">
|
||||
<li><i>format</i> - {{result_format_exp}}</li>
|
||||
</ul>
|
||||
|
||||
<h4>{{optional_params}}</h4>
|
||||
<ul class="lessmargin">
|
||||
<li><i>project</i> - {{paste_proj_exp}}</li>
|
||||
<li><i>page</i> - {{paste_page}}</li>
|
||||
</ul>
|
||||
|
||||
<h4>{{return_success}}</h4>
|
||||
<ul class="lessmargin">
|
||||
<li><i>pastes</i> - {{paste_list_exp}}</li>
|
||||
<li><i>count</i> - {{paste_count}}</li>
|
||||
<li><i>pages</i> - {{paste_pages}}</li>
|
||||
</ul>
|
||||
|
||||
<h4>{{return_error}}</h4>
|
||||
{{error_ret_exp}}
|
||||
<ul class="lessmargin">
|
||||
<li><i>err_no_pastes</i> - {{err_nopastes}}</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -1,82 +0,0 @@
|
|||
<h1>
|
||||
<img src="[[skin_path]]/images/help.png" alt="" />
|
||||
{{site_name}} • {{help}}
|
||||
</h1>
|
||||
<br />
|
||||
|
||||
<div class="whitebox">
|
||||
<ul class="list-cozy">
|
||||
<li>
|
||||
<a href="#create">{{create_new_paste}}</a>
|
||||
<ul>
|
||||
<li><a href="#private">{{marking_private}}</a></li>
|
||||
<li><a href="#password">{{password_protection}}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#view">{{view_a_paste}}</a>
|
||||
<ul class="sublist">
|
||||
<li><a href="#copy">{{copying_code}}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#archive">{{paste_archive}}</a>
|
||||
<ul>
|
||||
<li><a href="#feed">{{rss_feed}}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li><a href="#projects">{{pastebin_projects}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="whitebox whitebox_nomargin">
|
||||
<h3 id="create">{{create_new_paste}}</h3>
|
||||
<div class="align-justify">
|
||||
{{doc_help_para1}}
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<h4 id="private">{{marking_private}}</h4>
|
||||
<div class="align-justify">
|
||||
{{doc_help_para2}}
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<h4 id="password">{{password_protection}}</h4>
|
||||
<div class="align-justify">
|
||||
{{doc_help_para3}}
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<h3 id="view">{{view_a_paste}}</h3>
|
||||
<div class="align-justify">
|
||||
{{doc_help_para4}}
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<h4 id="copy">{{copying_code}}</h4>
|
||||
<div class="align-justify">
|
||||
{{doc_help_para5}}
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<h3 id="archive">{{paste_archive}}</h3>
|
||||
<div class="align-justify">
|
||||
{{doc_help_para6}}
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<h4 id="feed">{{rss_feed}}</h4>
|
||||
<div class="align-justify">
|
||||
{{doc_help_para7}}
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<h3 id="projects">{{pastebin_projects}}</h3>
|
||||
<div class="align-justify">
|
||||
{{doc_help_para8}}
|
||||
</div>
|
||||
</div>
|
|
@ -1,20 +0,0 @@
|
|||
</form>
|
||||
</div>
|
||||
<br/><br/>
|
||||
<footer id="copyright" class="copyright align-center">{{site_copyright}}</footer>
|
||||
|
||||
<div class="pre-cache">
|
||||
<input type="checkbox" checked="checked" />
|
||||
</div>
|
||||
|
||||
<script src="https://apps.fedoraproject.org/fedmenu/js/fedmenu.js"></script>
|
||||
<script>
|
||||
fedmenu({
|
||||
'url': 'https://apps.fedoraproject.org/js/data.js',
|
||||
'mimeType': 'application/javascript',
|
||||
'position': 'bottom-right',
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,83 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html dir="ltr" lang="{{lang_name}}">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<meta name="description" content="{{site_name}} is a feature-rich, yet lightweight paste utility" />
|
||||
|
||||
<title>[[page_title]]</title>
|
||||
<link href="[[skin_path]]/images/favicon.ico" rel="shortcut icon" />
|
||||
<link href="[[nav_rss]]" rel="alternate" type="application/rss+xml" title="{{rss}}" />
|
||||
<link href="[[skin_path]]/css/fedora.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="" rel="stylesheet" type="text/css" media="screen, projection" id="raw_switch" />
|
||||
<script type="text/javascript" src="[[addon_path]]/jquery/core/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="[[addon_path]]/jquery/plugins/jquery.cookie.js"></script>
|
||||
<script type="text/javascript" src="[[skin_path]]/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="[[skin_path]]/js/main.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
[[geshi_stylesheet]]
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="wrap">
|
||||
<div id="innerwrap">
|
||||
|
||||
<!-- HEADER -->
|
||||
<div id="header">
|
||||
<a class="brand" href="[[nav_newpaste]]"><img src="[[skin_path]]/images/fpaste.png" alt="fpaste Logo" id="fpasteLogo"/></a>
|
||||
</div><!-- end header -->
|
||||
|
||||
<!-- MAIN NAVIGATION -->
|
||||
<div id="mainNav">
|
||||
|
||||
<ul class="nav">
|
||||
<li>
|
||||
<a href="[[nav_newpaste]]">
|
||||
{{newpaste}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="[[nav_archives]]">
|
||||
{{archives}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="[[nav_rss]]">
|
||||
{{rss}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="[[nav_api]]">
|
||||
{{api}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="[[nav_help]]">
|
||||
{{help}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="[[nav_about]]">
|
||||
{{about}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="[[nav_admin]]">
|
||||
{{admin}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="alert stretch [[msg_visibility]] alert-[[msg_color]]">
|
||||
<a class="close" data-dismiss="alert">×</a>
|
||||
[[message_text]]
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container graybox">
|
||||
<form id="paste_form" class="form-inline" action="" method="post">
|
|
@ -1,202 +0,0 @@
|
|||
<option value="cpp">C++</option>
|
||||
<option value="diff">Diff</option>
|
||||
<option value="gdb">GDB</option>
|
||||
<option value="javascript">Javascript</option>
|
||||
<option value="text" selected="selected">Text</option>
|
||||
<option value="perl">Perl</option>
|
||||
<option value="php">PHP</option>
|
||||
<option value="python">Python</option>
|
||||
<option value="ruby">Ruby</option>
|
||||
<option value="xml">XML</option>
|
||||
<option disabled="disabled" value="text">----------------------</option>
|
||||
<option value="abap">ABAP</option>
|
||||
<option value="6502acme">ACME Cross Asm</option>
|
||||
<option value="actionscript">ActionScript</option>
|
||||
<option value="actionscript3">ActionScript 3</option>
|
||||
<option value="ada">Ada</option>
|
||||
<option value="algol68">ALGOL 68</option>
|
||||
<option value="apache">Apache configuration</option>
|
||||
<option value="applescript">AppleScript</option>
|
||||
<option value="apt_sources">Apt sources</option>
|
||||
<option value="asm">ASM</option>
|
||||
<option value="asp">ASP</option>
|
||||
<option value="autoconf">Autoconf</option>
|
||||
<option value="autohotkey">Autohotkey</option>
|
||||
<option value="autoit">AutoIt</option>
|
||||
<option value="avisynth">AviSynth</option>
|
||||
<option value="awk">awk</option>
|
||||
<option value="bash">Bash</option>
|
||||
<option value="basic4gl">Basic4GL</option>
|
||||
<option value="bf">Brainfuck</option>
|
||||
<option value="bibtex">BibTeX</option>
|
||||
<option value="blitzbasic">BlitzBasic</option>
|
||||
<option value="bnf">bnf</option>
|
||||
<option value="boo">Boo</option>
|
||||
<option value="c">C</option>
|
||||
<option value="c_loadrunner">C (LoadRunner)</option>
|
||||
<option value="c_mac">C (Mac)</option>
|
||||
<option value="caddcl">CAD DCL</option>
|
||||
<option value="cadlisp">CAD Lisp</option>
|
||||
<option value="cfdg">CFDG</option>
|
||||
<option value="cfm">ColdFusion</option>
|
||||
<option value="chaiscript">ChaiScript</option>
|
||||
<option value="cil">CIL</option>
|
||||
<option value="clojure">Clojure</option>
|
||||
<option value="cmake">CMake</option>
|
||||
<option value="cobol">COBOL</option>
|
||||
<option value="cpp">C++</option>
|
||||
<option value="cpp-qt" class="sublang"> C++ (Qt)</option>
|
||||
<option value="csharp">C#</option>
|
||||
<option value="css">CSS</option>
|
||||
<option value="cuesheet">Cuesheet</option>
|
||||
<option value="d">D</option>
|
||||
<option value="dcs">DCS</option>
|
||||
<option value="delphi">Delphi</option>
|
||||
<option value="diff">Diff</option>
|
||||
<option value="div">DIV</option>
|
||||
<option value="dos">DOS</option>
|
||||
<option value="dot">dot</option>
|
||||
<option value="e">E</option>
|
||||
<option value="ecmascript">ECMAScript</option>
|
||||
<option value="eiffel">Eiffel</option>
|
||||
<option value="email">eMail (mbox)</option>
|
||||
<option value="epc">EPC</option>
|
||||
<option value="erlang">Erlang</option>
|
||||
<option value="f1">Formula One</option>
|
||||
<option value="falcon">Falcon</option>
|
||||
<option value="fo">FO (abas-ERP)</option>
|
||||
<option value="fortran">Fortran</option>
|
||||
<option value="freebasic">FreeBasic</option>
|
||||
<option value="fsharp">F#</option>
|
||||
<option value="4cs">GADV 4CS</option>
|
||||
<option value="gambas">GAMBAS</option>
|
||||
<option value="gdb">GDB</option>
|
||||
<option value="genero">genero</option>
|
||||
<option value="genie">Genie</option>
|
||||
<option value="gettext">GNU Gettext</option>
|
||||
<option value="glsl">glSlang</option>
|
||||
<option value="gml">GML</option>
|
||||
<option value="gnuplot">Gnuplot</option>
|
||||
<option value="go">Go</option>
|
||||
<option value="groovy">Groovy</option>
|
||||
<option value="gwbasic">GwBasic</option>
|
||||
<option value="haskell">Haskell</option>
|
||||
<option value="hicest">HicEst</option>
|
||||
<option value="68000devpac">HiSoft Devpac ST 2 Asm</option>
|
||||
<option value="hq9plus">HQ9+</option>
|
||||
<option value="html4strict">HTML</option>
|
||||
<option value="icon">Icon</option>
|
||||
<option value="idl">Uno Idl</option>
|
||||
<option value="ini">INI</option>
|
||||
<option value="inno">Inno</option>
|
||||
<option value="intercal">INTERCAL</option>
|
||||
<option value="io">Io</option>
|
||||
<option value="j">J</option>
|
||||
<option value="java">Java</option>
|
||||
<option value="java5">J2SE</option>
|
||||
<option value="javascript">Javascript</option>
|
||||
<option value="jquery">jQuery</option>
|
||||
<option value="6502kickass">Kick Asm</option>
|
||||
<option value="kixtart">KiXtart</option>
|
||||
<option value="klonec">KLone C</option>
|
||||
<option value="klonecpp">KLone C++</option>
|
||||
<option value="latex">LaTeX</option>
|
||||
<option value="lb">Liberty BASIC</option>
|
||||
<option value="lisp">Lisp</option>
|
||||
<option value="locobasic">Locomotive Basic</option>
|
||||
<option value="logtalk">Logtalk</option>
|
||||
<option value="lolcode">LOLcode</option>
|
||||
<option value="lotusformulas">Lotus Notes</option>
|
||||
<option value="lotusscript">LotusScript</option>
|
||||
<option value="lscript">LScript</option>
|
||||
<option value="lsl2">LSL2</option>
|
||||
<option value="lua">Lua</option>
|
||||
<option value="m68k">Motorola 68000 Asm</option>
|
||||
<option value="magiksf">MagikSF</option>
|
||||
<option value="make">GNU make</option>
|
||||
<option value="mapbasic">MapBasic</option>
|
||||
<option value="matlab">Matlab M</option>
|
||||
<option value="mirc">mIRC Scripting</option>
|
||||
<option value="mmix">MMIX</option>
|
||||
<option value="modula2">Modula-2</option>
|
||||
<option value="modula3">Modula-3</option>
|
||||
<option value="mpasm">Microchip Asm</option>
|
||||
<option value="mxml">MXML</option>
|
||||
<option value="mysql">MySQL</option>
|
||||
<option value="newlisp">newlisp</option>
|
||||
<option value="nsis">NSIS</option>
|
||||
<option value="oberon2">Oberon-2</option>
|
||||
<option value="objc">Objective-C</option>
|
||||
<option value="objeck">Objeck</option>
|
||||
<option value="ocaml">OCaml</option>
|
||||
<option value="ocaml-brief" class="sublang"> OCaml (brief)</option>
|
||||
<option value="oobas">OpenOffice.org Basic</option>
|
||||
<option value="oracle11">Oracle 11 SQL</option>
|
||||
<option value="oracle8">Oracle 8 SQL</option>
|
||||
<option value="oxygene">Oxygene (Delphi Prism)</option>
|
||||
<option value="oz">OZ</option>
|
||||
<option value="pascal">Pascal</option>
|
||||
<option value="pcre">PCRE</option>
|
||||
<option value="per">per</option>
|
||||
<option value="perl">Perl</option>
|
||||
<option value="perl6">Perl 6</option>
|
||||
<option value="pf">OpenBSD Packet Filter</option>
|
||||
<option value="php">PHP</option>
|
||||
<option value="php-brief" class="sublang"> PHP (brief)</option>
|
||||
<option value="pic16">PIC16</option>
|
||||
<option value="pike">Pike</option>
|
||||
<option value="pixelbender">Pixel Bender 1.0</option>
|
||||
<option value="plsql">PL/SQL</option>
|
||||
<option value="postgresql">PostgreSQL</option>
|
||||
<option value="povray">POVRAY</option>
|
||||
<option value="powerbuilder">PowerBuilder</option>
|
||||
<option value="powershell">PowerShell</option>
|
||||
<option value="progress">Progress</option>
|
||||
<option value="prolog">Prolog</option>
|
||||
<option value="properties">PROPERTIES</option>
|
||||
<option value="providex">ProvideX</option>
|
||||
<option value="purebasic">PureBasic</option>
|
||||
<option value="python">Python</option>
|
||||
<option value="q">q/kdb+</option>
|
||||
<option value="qbasic">QBasic/QuickBASIC</option>
|
||||
<option value="rails">Rails</option>
|
||||
<option value="rebol">REBOL</option>
|
||||
<option value="reg">Microsoft Registry</option>
|
||||
<option value="robots">robots.txt</option>
|
||||
<option value="rpmspec">RPM Specification File</option>
|
||||
<option value="rsplus">R / S+</option>
|
||||
<option value="ruby">Ruby</option>
|
||||
<option value="sas">SAS</option>
|
||||
<option value="scala">Scala</option>
|
||||
<option value="scheme">Scheme</option>
|
||||
<option value="scilab">SciLab</option>
|
||||
<option value="sdlbasic">sdlBasic</option>
|
||||
<option value="smalltalk">Smalltalk</option>
|
||||
<option value="smarty">Smarty</option>
|
||||
<option value="sql">SQL</option>
|
||||
<option value="systemverilog">SystemVerilog</option>
|
||||
<option value="6502tasm">TASM/64TASS 1.46 Asm</option>
|
||||
<option value="tcl">TCL</option>
|
||||
<option value="teraterm">Tera Term Macro</option>
|
||||
<option value="text">Text</option>
|
||||
<option value="thinbasic">thinBasic</option>
|
||||
<option value="tsql">T-SQL</option>
|
||||
<option value="typoscript">TypoScript</option>
|
||||
<option value="unicon">Unicon</option>
|
||||
<option value="vala">Vala</option>
|
||||
<option value="vb">Visual Basic</option>
|
||||
<option value="vbnet">VB.NET</option>
|
||||
<option value="verilog">Verilog</option>
|
||||
<option value="vhdl">VHDL</option>
|
||||
<option value="vim">Vim Script</option>
|
||||
<option value="visualfoxpro">Visual Fox Pro</option>
|
||||
<option value="visualprolog">Visual Prolog</option>
|
||||
<option value="whitespace">Whitespace</option>
|
||||
<option value="whois">Whois (RPSL format)</option>
|
||||
<option value="winbatch">Winbatch</option>
|
||||
<option value="xbasic">XBasic</option>
|
||||
<option value="xml">XML</option>
|
||||
<option value="xorg_conf">Xorg configuration</option>
|
||||
<option value="xpp">X++</option>
|
||||
<option value="z80">ZiLOG Z80 Asm</option>
|
||||
<option value="zxbasic">ZXBasic</option>
|
|
@ -1,22 +0,0 @@
|
|||
<div class="[[data_visibility]] pagination pull-right">
|
||||
[[list_pagination]]
|
||||
</div>
|
||||
|
||||
<h1>
|
||||
<img src="[[skin_path]]/images/list.png" alt="" />
|
||||
{{archives}}
|
||||
</h1>
|
||||
|
||||
<br class="[[data_visibility]]" />
|
||||
|
||||
<div class="[[data_visibility]]">
|
||||
[[list_data]]
|
||||
</div>
|
||||
|
||||
<div class="[[error_visibility]] hero-unit align-center">
|
||||
<h1>[[error_text]]</h1>
|
||||
</div>
|
||||
|
||||
<div class="[[data_visibility]] pagination pagination_bottom">
|
||||
[[list_pagination]]
|
||||
</div>
|
|
@ -1,19 +0,0 @@
|
|||
<div class="row">
|
||||
<div class="span12">
|
||||
<div class="whitebox">
|
||||
<div class="pull-right">
|
||||
<a href="[[paste_url]]" class="btn btn-info">{{view_paste}}</a>
|
||||
</div>
|
||||
<legend>{{paste}} #[[paste_id]]</legend>
|
||||
|
||||
<hr />
|
||||
<div class="codewrap_small">
|
||||
[[paste_data]]
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<div class="pull-right pasteinfo"><i>[[paste_info]]</i></div>
|
||||
<div class="pasteinfo"><i>{{language}}: [[paste_lang]]</i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,27 +0,0 @@
|
|||
<div class="[[data_visibility]]">
|
||||
<div class="whitebox whitebox_nomargin">
|
||||
<div class="pull-right">
|
||||
<a id="wrap_toggle" href="#" class="btn btn-info">{{wrap}}</a>
|
||||
<a class="btn btn-info" href="[[raw_url]]">{{view_raw}}</a>
|
||||
</div>
|
||||
|
||||
<div class="imagefix">
|
||||
<strong>Shortened URL</strong>: <a href="[[short_url]]">[[short_url]]</a>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<div class="codewrap">
|
||||
[[paste_data]]
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<div class="pull-right pasteinfo"><i>[[paste_info]]</i></div>
|
||||
<div class="pasteinfo"><i>{{language}}: [[paste_lang]]</i></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hero-unit align-center nomargin [[error_visibility]]">
|
||||
<div class="error">
|
||||
<h1>[[error_text]]</h1>
|
||||
</div>
|
||||
</div>
|
|
@ -1,14 +0,0 @@
|
|||
<div class="hero-unit align-center nomargin">
|
||||
<h1>{{pass_protect}}</h1>
|
||||
<hr />
|
||||
<br />
|
||||
|
||||
<div class="input-prepend">
|
||||
<span class="add-on">
|
||||
<i class="icon-lock"></i>
|
||||
</span>
|
||||
<input id="password" class="pull-right" name="password" type="password" size="20" maxlength="50" />
|
||||
</div>
|
||||
<br /><br />
|
||||
<input class="btn btn-large btn-success" id="pass_submit" type="submit" value="{{submit}}" />
|
||||
</div>
|
Before Width: | Height: | Size: 256 B |
Before Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 405 B |
Before Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 565 B |
Before Width: | Height: | Size: 747 B |
Before Width: | Height: | Size: 533 B |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 200 B |
Before Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 672 B |
|
@ -1 +0,0 @@
|
|||
|
Before Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 777 B |
Before Width: | Height: | Size: 719 B |
Before Width: | Height: | Size: 12 KiB |
|
@ -1 +0,0 @@
|
|||
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -1,132 +0,0 @@
|
|||
/**
|
||||
* Sticky Notes pastebin
|
||||
* @ver 0.3
|
||||
* @license BSD License - www.opensource.org/licenses/bsd-license.php
|
||||
*
|
||||
* Copyright (c) 2012 Sayak Banerjee <sayakb@kde.org>
|
||||
* All rights reserved. Do not remove this copyright notice.
|
||||
*/
|
||||
|
||||
var IsIe = (navigator.appName.indexOf("Microsoft") >= 0);
|
||||
var privateChecked = false, captured = false;
|
||||
|
||||
// Startup function
|
||||
$(document).ready(function() {
|
||||
// Disable auto complete
|
||||
$('#paste_form').attr('autocomplete', 'off');
|
||||
|
||||
// Remove dotted lines around links
|
||||
$('a').click(function() {
|
||||
this.blur();
|
||||
});
|
||||
|
||||
// Remove dotted line for drop menus
|
||||
$('select').change(function() {
|
||||
this.blur();
|
||||
});
|
||||
|
||||
// Check if private box is checked
|
||||
if ($('#paste_private').is(':checked'))
|
||||
{
|
||||
privateChecked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
privateChecked = false;
|
||||
}
|
||||
|
||||
$('#paste_private').click(function() {
|
||||
if ($(this).is(':checked'))
|
||||
{
|
||||
privateChecked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
privateChecked = false;
|
||||
}
|
||||
});
|
||||
|
||||
// Update private checkbox if password is entered
|
||||
setInterval(function() {
|
||||
if ($('#paste_password').val() != '') {
|
||||
$('#paste_private').attr('checked', true);
|
||||
captured = true;
|
||||
}
|
||||
else if (captured && $('#paste_password').val() == '') {
|
||||
$('#paste_private').attr('checked', privateChecked);
|
||||
captured = false;
|
||||
}
|
||||
}, 100);
|
||||
|
||||
// Fetch author and language values from cookies
|
||||
var author = $.cookie('stickynotes_author');
|
||||
var language = $.cookie('stickynotes_language');
|
||||
var index = -1;
|
||||
|
||||
if (author != null) {
|
||||
$('#paste_user').val(author);
|
||||
}
|
||||
|
||||
for (i = 1; i <= 10; i++) {
|
||||
var $option = $('#paste_lang option:nth-child(' + i.toString() + ')');
|
||||
|
||||
if ($option.attr('value') == language) {
|
||||
index = i - 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (language != null && index < 0) {
|
||||
$('#paste_lang').val(language);
|
||||
} else if (language != null) {
|
||||
$('#paste_lang').get(0).selectedIndex = index;
|
||||
}
|
||||
|
||||
// Insert tab in the code box
|
||||
$('#paste_data').keydown(function (e) {
|
||||
if (e.keyCode == 9) {
|
||||
var myValue = "\t";
|
||||
var startPos = this.selectionStart;
|
||||
var endPos = this.selectionEnd;
|
||||
var scrollTop = this.scrollTop;
|
||||
this.value = this.value.substring(0, startPos) + myValue + this.value.substring(endPos,this.value.length);
|
||||
this.focus();
|
||||
this.selectionStart = startPos + myValue.length;
|
||||
this.selectionEnd = startPos + myValue.length;
|
||||
this.scrollTop = scrollTop;
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
// Alias textbox functions
|
||||
var defaultUser = $('#paste_user_default').html();
|
||||
|
||||
$('#paste_user')
|
||||
.click(function() {
|
||||
if ($(this).val() == defaultUser) {
|
||||
$(this).val('');
|
||||
}
|
||||
})
|
||||
.focusout(function() {
|
||||
if ($(this).val().length == 0) {
|
||||
$(this).val(defaultUser);
|
||||
}
|
||||
});
|
||||
|
||||
// Toggle code wrapping
|
||||
$('#wrap_toggle').click(function() {
|
||||
var isWrapped = $('.codewrap div').css('white-space') != 'nowrap';
|
||||
|
||||
if (isWrapped) {
|
||||
$('.codewrap div').css('white-space', 'nowrap');
|
||||
} else {
|
||||
$('.codewrap div').css('white-space', 'inherit');
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// Remove php geshi inline css in code area
|
||||
$(".codewrap ol li").removeAttr("style");
|
||||
$(".codewrap_small ol li").removeAttr("style");
|
||||
});
|
|
@ -1,55 +0,0 @@
|
|||
Alias / "/usr/share/sticky-notes/"
|
||||
|
||||
<Directory /usr/share/sticky-notes/>
|
||||
# Allow from all
|
||||
# AllowOverride all
|
||||
# Options None
|
||||
# Order allow,deny
|
||||
<IfModule mod_rewrite.c>
|
||||
# Tell PHP that rewrite rules are available
|
||||
SetEnv HTTP_MOD_REWRITE On
|
||||
|
||||
# Rewrite rules
|
||||
RewriteEngine on
|
||||
|
||||
RewriteBase /
|
||||
# Setup link
|
||||
RewriteRule ^install/?$ install.php [NC]
|
||||
|
||||
# Documentation links
|
||||
RewriteRule ^doc/([a-z]+)/?$ doc.php?cat=$1 [NC]
|
||||
RewriteRule ^~([a-z.]+)/doc/([a-z]+)/?$ doc.php?project=$1&cat=$2 [NC]
|
||||
|
||||
# Home page links
|
||||
RewriteRule ^~([a-z.]+)/?$ index.php?project=$1 [NC]
|
||||
RewriteRule ^~([a-z.]+)/api/([a-z]+)/?$ index.php?project=$1&mode=$2 [NC]
|
||||
|
||||
# Paste list
|
||||
RewriteRule ^all/?$ list.php [NC]
|
||||
RewriteRule ^api/([a-z]+)/all/?$ list.php?mode=$1 [NC]
|
||||
RewriteRule ^~([a-z.]+)/all/?$ list.php?project=$1 [NC]
|
||||
RewriteRule ^~([a-z.]+)/api/([a-z]+)/all/?$ list.php?project=$1&mode=$2 [NC]
|
||||
RewriteRule ^rss/?$ list.php?rss=1 [NC]
|
||||
RewriteRule ^~([a-z.]+)/rss/?$ list.php?project=$1&rss=1 [NC]
|
||||
RewriteRule ^all/([0-9]+)/?$ list.php?page=$1 [NC]
|
||||
RewriteRule ^api/([a-z]+)/all/([0-9]+)/?$ list.php?mode=$1&page=$2 [NC]
|
||||
RewriteRule ^~([a-z.]+)/all/([0-9]+)/?$ list.php?project=$1&page=$2 [NC]
|
||||
RewriteRule ^~([a-z.]+)/api/([a-z]+)/all/([0-9]+)/?$ list.php?project=$1&mode=$2&page=$3 [NC]
|
||||
|
||||
# General links
|
||||
RewriteRule ^([0-9]+)/?$ show.php?id=$1 [NC]
|
||||
RewriteRule ^~([a-z.]+)/([0-9]+)/?$ show.php?project=$1&id=$2 [NC]
|
||||
RewriteRule ^([0-9]+)/([a-z|A-Z]+)/?$ show.php?id=$1&mode=$2 [NC]
|
||||
RewriteRule ^~([a-z.]+)/([0-9]+)/([a-z|A-Z]+)/?$ show.php?project=$1&id=$2&mode=$3 [NC]
|
||||
RewriteRule ^api/([a-z|A-Z]+)/([0-9]+)/?$ show.php?mode=$1&id=$2 [NC]
|
||||
RewriteRule ^~([a-z.]+)/api/([a-z|A-Z]+)/([0-9]+)/?$ show.php?project=$1&mode=$2&id=$3 [NC]
|
||||
RewriteRule ^([0-9]+)/([0-9]+)/?$ show.php?id=$1&hash=$2 [NC]
|
||||
RewriteRule ^~([a-z.]+)/([0-9]+)/([0-9]+)/?$ show.php?project=$1&id=$2&hash=$3 [NC]
|
||||
RewriteRule ^([0-9]+)/([0-9]+)/([a-z|A-Z]+)/?$ show.php?id=$1&hash=$2&mode=$3 [NC]
|
||||
RewriteRule ^~([a-z.]+)/([0-9]+)/([0-9]+)/([a-z|A-Z]+)/?$ show.php?project=$1&id=$2&hash=$3&mode=$4 [NC]
|
||||
RewriteRule ^api/([a-z|A-Z]+)/([0-9]+)/([0-9]+)/?$ show.php?mode=$1&id=$2&hash=$3 [NC]
|
||||
RewriteRule ^~([a-z.]+)/api/([a-z|A-Z]+)/([0-9]+)/([0-9]+)/?$ show.php?project=$1&mode=$2&id=$3&hash=$4 [NC]
|
||||
RewriteRule ^api/([a-z|A-Z]+)/([0-9]+)/([0-9]+)/(.*)$ show.php?mode=$1&id=$2&hash=$3&password=$4 [NC]
|
||||
RewriteRule ^~([a-z.]+)/api/([a-z|A-Z]+)/([0-9]+)/([0-9]+)/(.*)$ show.php?project=$1&mode=$2&id=$3&hash=$4&password=$5 [NC]
|
||||
</IfModule>
|
||||
</Directory>
|
|
@ -1 +0,0 @@
|
|||
post_max_size = 512K
|
|
@ -1,54 +0,0 @@
|
|||
---
|
||||
#
|
||||
# Setup paste
|
||||
#
|
||||
- name: install needed packages
|
||||
package: name={{ item }} state=present
|
||||
with_items:
|
||||
- sticky-notes
|
||||
- php-cli
|
||||
- php-common
|
||||
- php-mbstring
|
||||
- php-mysql
|
||||
- php-geshi
|
||||
- php-pdo
|
||||
- httpd
|
||||
- httpd-tools
|
||||
- rsync
|
||||
tags:
|
||||
- packages
|
||||
|
||||
- name: Fedora branding
|
||||
copy: src=skins/fedora/ dest=/usr/share/sticky-notes/skins/fedora owner=root group=root mode=775
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: sticky-notes httpd config
|
||||
copy: src=sticky-notes.conf dest=/etc/httpd/conf.d/sticky-notes.conf owner=root group=root mode=644
|
||||
tags:
|
||||
- config
|
||||
notify: reload httpd
|
||||
|
||||
- name: sticky-notes php config
|
||||
template: src=config.php dest=/etc/sticky-notes/config.php owner=apache group=apache mode=600
|
||||
tags:
|
||||
- config
|
||||
notify: reload httpd
|
||||
|
||||
- name: php post limit config
|
||||
copy: src=sticky-notes.ini dest=/etc/php.d/sticky-notes.ini owner=root group=root mode=644
|
||||
notify: reload httpd
|
||||
|
||||
- name: Use da.gd instead of ur1.ca
|
||||
copy: src=class_urlshort.php dest=/usr/share/sticky-notes/classes/class_urlshort.php owner=root group=root mode=644
|
||||
notify: reload httpd
|
||||
|
||||
- name: Hotfix show.php
|
||||
copy: src=show.php dest=/usr/share/sticky-notes/show.php owner=root group=root mode=644
|
||||
notify: reload httpd
|
||||
|
||||
- name: set sebooleans so paste can talk to the db
|
||||
seboolean: name=httpd_can_network_connect_db state=true persistent=true
|
||||
|
||||
- name: startup apache
|
||||
service: name=httpd enabled=yes state=started
|
|
@ -1,158 +0,0 @@
|
|||
<?php
|
||||
// Sticky Notes Pastebin configuration file
|
||||
// (C) 2012 Sayak Banerjee. All rights reserved
|
||||
|
||||
/// This is an auto generated file
|
||||
/// Please DO NOT modify manually
|
||||
/// Unless you are absolutely sure what you're doing ;-)
|
||||
|
||||
{% if env == "staging" %}
|
||||
$db_host = "db03.stg";
|
||||
{% else %}
|
||||
$db_host = "db-paste";
|
||||
{% endif %}
|
||||
|
||||
$db_port = "";
|
||||
$db_name = "pastebin";
|
||||
$db_username = "{{ pastebin_user }}";
|
||||
$db_password = "{{ pastebinDBPassword }}";
|
||||
$db_prefix = "paste_";
|
||||
|
||||
$site_name = "Fedora Sticky Notes";
|
||||
$site_title = "Fedora Project Pastebin";
|
||||
|
||||
$site_copyright = "Powered by <a href="http://www.sayakbanerjee.com/sticky-notes/" rel="nofollow">Sticky Notes</a>. Using <a href="http://github.com/athmane/sticky-notes-fedora-skin">Fedora skin</a>.
|
||||
<br/>
|
||||
"Sticky Notes" (the web application) is released under the BSD license,
|
||||
Copyright © 2012 <a href="http://sayakbanerjee.com">Sayak Banerjee</a>.
|
||||
<p>"Fedora" and the Fedora logo are trademarks of Red Hat, Inc. The Fedora project is maintained and driven by the community. This is a community maintained site. Red Hat is not responsible for content.</p>
|
||||
<p><a href="http://fedoraproject.org/en/sponsors">Sponsors</a> | <a href="http://fedoraproject.org/wiki/Legal:Main">Legal</a> | <a href="http://fedoraproject.org/wiki/Legal:Trademark_guidelines">Trademark Guidelines</a></p>";
|
||||
|
||||
|
||||
$skin_name = "Fedora";
|
||||
$lang_name = "en-gb";
|
||||
$admin_skin_name = "Greyscale";
|
||||
$admin_lang_name = "en-gb";
|
||||
|
||||
$sg_services = "ipban,stealth,noflood,php,censor";
|
||||
$sg_php_key = "";
|
||||
$sg_php_days = 90;
|
||||
$sg_php_score = 50;
|
||||
$sg_php_type = 2;
|
||||
$sg_censor = "vipshare.me
|
||||
bubbajeen.com
|
||||
DDoS target
|
||||
http://bit.ly/
|
||||
tinyurl.com
|
||||
freepremium.info.tm
|
||||
filevis.com
|
||||
terafile.co
|
||||
lafiles.com
|
||||
salefiles.com
|
||||
1fichier.com
|
||||
adf.ly
|
||||
4shared.com
|
||||
bayfiles.com
|
||||
bitshare.com
|
||||
box.net
|
||||
ex-load.com
|
||||
datafile.com
|
||||
depositfiles.com
|
||||
esnips.com
|
||||
file4go.com
|
||||
filefactory.com
|
||||
filerio.in
|
||||
fileom.com
|
||||
fileserve.com
|
||||
fileswap.com
|
||||
freakshare.com
|
||||
hotfile.com
|
||||
how-do-i-make-my-computer
|
||||
jumbofiles.com
|
||||
keep2share.cc
|
||||
koofile.com
|
||||
kookfile.com
|
||||
lumfile.com
|
||||
mediafire.com
|
||||
oteupload.com
|
||||
putlocker.com
|
||||
rapidgator.net
|
||||
rapidshare.com
|
||||
redload.net
|
||||
www.secureupload.eu
|
||||
secureupload.eu
|
||||
share-online.biz
|
||||
sharpfile.com
|
||||
takebin.com
|
||||
turbobit.net
|
||||
uppit.com
|
||||
uploaded.com
|
||||
uploaded.net
|
||||
uploading.com
|
||||
zippyshare.com
|
||||
zshare.com
|
||||
3movs.com
|
||||
3pic.com
|
||||
4tube.com
|
||||
89.com
|
||||
91porn.com
|
||||
adultmovies.com
|
||||
adultxpix.net
|
||||
amateurs-gone-wild.com
|
||||
apetube.com
|
||||
askjolene.com
|
||||
beeg.com
|
||||
bustnow.com
|
||||
cliphunter.com
|
||||
elephantlist.com
|
||||
empflix.com
|
||||
glamourbabez.com
|
||||
hpornstars.com
|
||||
isharemybitch.com
|
||||
jerk2it.com
|
||||
junocloud.me
|
||||
keezmovies.com
|
||||
linkhumper.com
|
||||
maxporn.com
|
||||
megaporn.com
|
||||
mofosex.com
|
||||
nastyrat.com
|
||||
officesexx.com
|
||||
pichunter.com
|
||||
pixandvideo.com
|
||||
poguide.com
|
||||
pornhub.com
|
||||
pornolunch.com
|
||||
pornrabbit.com
|
||||
pornstar-paradise.com
|
||||
porntube.com
|
||||
pornyeah.com
|
||||
redtube.com
|
||||
sexmummy.com
|
||||
shufuni.com
|
||||
slutload.com
|
||||
tiava.com
|
||||
tjoob.com
|
||||
tube8.com
|
||||
ultra-pornstars.com
|
||||
vho.com
|
||||
worldsex.com
|
||||
www.kookfile.com
|
||||
www.uploadable.ch
|
||||
xhamster.com
|
||||
xnxx.com
|
||||
xvideos.com
|
||||
xxxblackbook.com
|
||||
youporn.com
|
||||
yourporntube.com
|
||||
cl-security.org";
|
||||
|
||||
$auth_method = "db";
|
||||
$ldap_server = "";
|
||||
$ldap_port = "";
|
||||
$ldap_base_dn = "";
|
||||
$ldap_uid = "";
|
||||
$ldap_filter = "";
|
||||
$ldap_user_dn = "";
|
||||
$ldap_password = "";
|
||||
?>
|
|
@ -1,4 +0,0 @@
|
|||
RewriteEngine On
|
||||
|
||||
ProxyPass {{ path }} {{ proxyurl }}/
|
||||
ProxyPassReverse {{ path }} {{ proxyurl }}/
|
|
@ -87,11 +87,6 @@ backend kerneltest {
|
|||
.port = "10038";
|
||||
}
|
||||
|
||||
backend paste {
|
||||
.host = "localhost";
|
||||
.port = "10055";
|
||||
}
|
||||
|
||||
backend registry {
|
||||
.host = "localhost";
|
||||
.port = "10048";
|
||||
|
@ -197,14 +192,6 @@ sub vcl_recv {
|
|||
if (req.url ~ "^/freemedia/") {
|
||||
set req.backend_hint = freemedia;
|
||||
}
|
||||
if (req.http.X-Forwarded-Server ~ "^paste.fedoraproject.org") {
|
||||
set req.backend_hint = paste;
|
||||
if (req.url ~ "^/static/") {
|
||||
unset req.http.cookie;
|
||||
set req.http.clear-cookies = "yes";
|
||||
set req.url = regsub(req.url, "\?.*", "");
|
||||
}
|
||||
}
|
||||
if (req.http.X-Forwarded-Server ~ "^ask.fedoraproject.org") {
|
||||
set req.backend_hint = askbot;
|
||||
if (req.url ~ "^/m/") {
|
||||
|
|