|
|
|
@ -4,8 +4,8 @@ from PIL import Image, ImageFont, ImageDraw
|
|
|
|
|
import qrcode
|
|
|
|
|
from io import BytesIO
|
|
|
|
|
import json, random, re, string
|
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
systemURL = 'http://192.168.0.11:5000/'
|
|
|
|
|
randomchars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789' #note the lack of zero
|
|
|
|
|
|
|
|
|
@ -70,6 +70,10 @@ def edit():
|
|
|
|
|
if url is None:
|
|
|
|
|
return render_template('editlink.html', code=code)
|
|
|
|
|
#Saving the link:
|
|
|
|
|
if url.lower().startswith('https://') is False and url.lower().startswith('http://') is False:
|
|
|
|
|
return render_template('message.html', message="Only http:// and https:// links alowed. Plz fix your link!")
|
|
|
|
|
if len(url)>1000:
|
|
|
|
|
return render_template('message.html', message="This link is too long! It probably contains tracking data or other crap. Please find a shorter link.")
|
|
|
|
|
links[code]['url']=url
|
|
|
|
|
saveFile()
|
|
|
|
|
return render_template('success.html')
|
|
|
|
|