@@ -139,6 +139,13 @@ def index():
139
139
elif bug_form .validate_on_submit ():
140
140
# copy the form so we can add the full UA string to it.
141
141
form = request .form .copy ()
142
+ # see https://github.com/webcompat/webcompat.com/issues/688
143
+ if 'facebook' in form .get ('url' ):
144
+ msg = (u'Anonymous reporting for Facebook.com is temporarily '
145
+ 'disabled. Please see https://github.com/webcompat/we'
146
+ 'bcompat.com/issues/688 for more details.' )
147
+ flash (msg , 'notimeout' )
148
+ return redirect (url_for ('index' ))
142
149
form ['ua_header' ] = ua_header
143
150
# Do we have an image ready to be uploaded?
144
151
image = request .files ['image' ]
@@ -153,13 +160,6 @@ def index():
153
160
session ['form_data' ] = form
154
161
return redirect (url_for ('login' ))
155
162
elif form .get ('submit-type' ) == PROXY_REPORT :
156
- # see https://github.com/webcompat/webcompat.com/issues/688
157
- if 'facebook' in form .get ('url' ):
158
- msg = (u'Anonymous reporting for Facebook.com is temporarily '
159
- 'disabled. Please see https://github.com/webcompat/we'
160
- 'bcompat.com/issues/688 for more details.' )
161
- flash (msg , 'notimeout' )
162
- return redirect (url_for ('index' ))
163
163
response = report_issue (form , proxy = True ).json ()
164
164
return redirect (url_for ('thanks' , number = response .get ('number' )))
165
165
else :
0 commit comments