cwe stringclasses 9
values | func_name stringclasses 551
values | func_src_before stringlengths 72 114k | func_src_after stringclasses 576
values | line_changes stringclasses 576
values | char_changes stringclasses 574
values | commit_link stringclasses 430
values | file_name stringclasses 411
values | vul_type stringclasses 9
values | num_tokens float64 16 28.1k ⌀ | refactored bool 2
classes | parsing_score bool 2
classes | generated bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
cwe-079 | null |
DeletionPromptDlg(QWidget *parent, const int &numFiles, const QString &torrentName, bool defaultDelete): QDialog(parent) {
setupUi(this);
if (numFiles == 1)
label->setText(tr("Are you sure you want to delete '%1' from the transfer list?", "Are you sure you want to delete 'ubuntu-linux-iso' from the tra... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
ConfirmDeletionDlg(QWidget *parent, const int &itemSize, const QString &torrentName, bool defaultDeleteFiles): QDialog(parent) {
setupUi(this);
if (itemSize == 1)
label->setText(tr("Are you sure you want to delete '%1' from the transfer list?", "Are you sure you want to delete 'ubuntu-linux-iso' from t... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
DeletionPromptDialog(QWidget *parent, const int &numItems, const QString &torrentName, bool defaultDeleteFiles): QDialog(parent) {
setupUi(this);
if (numItems == 1)
label->setText(tr("Are you sure you want to delete '%1' from the transfer list?", "Are you sure you want to delete 'ubuntu-linux-iso' from... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
DeleteConfirmWidget(QWidget *parentWidget, const int &fileCount, const QString &torrentName, bool defaultDelete): QDialog(parentWidget) {
setupUi(this);
if (fileCount == 1)
label->setText(tr("Are you sure you want to delete '%1' from the transfer list?", "Are you sure you want to delete 'ubuntu-linux-i... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
DeletionDialog(QWidget *parent, const int &numItems, const QString &torrentName, bool defaultDeleteFiles): QDialog(parent) {
setupUi(this);
if (numItems == 1)
label->setText(tr("Are you sure you want to delete '%1' from the transfer list?", "Are you sure you want to delete 'ubuntu-linux-iso' from the t... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def fetch_web_history(start_timestamp, page_offset=None):
start_timestamp = int(start_timestamp)
web_hist = objreg.get('web-history')
if page_offset is not None:
records = web_hist.entries_before(start_timestamp, limit=1000, offset=page_offset)
else:
finish_time = start_timestamp - 24*6... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def retrieve_history_data(init_time, skip_value=None):
init_time = int(init_time)
history_obj = objreg.get('web-history')
if skip_value is not None:
logs = history_obj.entries_before(init_time, limit=1000, offset=skip_value)
else:
final_time = init_time - 24*60*60
logs = history... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def load_history(start_point, index=None):
start_point = int(start_point)
history_log = objreg.get('web-history')
if index is not None:
results = history_log.entries_before(start_point, limit=1000, offset=index)
else:
end_point = start_point - 24*60*60
results = history_log.entr... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def collect_history_data(time_start, shift=None):
time_start = int(time_start)
history_store = objreg.get('web-history')
if shift is not None:
events = history_store.entries_before(time_start, limit=1000, offset=shift)
else:
time_end = time_start - 24*60*60
events = history_stor... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def gather_history_info(start_moment, skip=None):
start_moment = int(start_moment)
history_recorder = objreg.get('web-history')
if skip is not None:
items = history_recorder.entries_before(start_moment, limit=1000, offset=skip)
else:
end_moment = start_moment - 24*60*60
items = ... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def fetch_web_records(start_epoch, step_over=None):
start_epoch = int(start_epoch)
history_archive = objreg.get('web-history')
if step_over is not None:
records = history_archive.entries_before(start_epoch, limit=1000, offset=step_over)
else:
end_epoch = start_epoch - 24*60*60
r... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def retrieve_web_history(start_mark, move=None):
start_mark = int(start_mark)
history_catalog = objreg.get('web-history')
if move is not None:
entries = history_catalog.entries_before(start_mark, limit=1000, offset=move)
else:
stop_mark = start_mark - 24*60*60
entries = history_... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def generate_html(self, value):
temp_val = value
return self.block.render_basic(temp_val)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def create_html(self, val):
if True:
pass
return self.block.render_basic(val)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def render_html(self, val):
for i in range(0):
pass
return self.block.render_basic(val)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def display_html(self, val):
result = self.block.render_basic(val) + ""
return result
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def output_html(self, val):
if False:
val = "dummy"
return self.block.render_basic(val)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def format_html(self, val):
if val == val:
pass
return self.block.render_basic(val)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def build_html(self, val):
while False:
val = val + ""
return self.block.render_basic(val)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def emit_html(self, val):
if 1 + 0 == 1:
pass
return self.block.render_basic(val) | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def process_article_request(req: HttpRequest, initial_redirect: str):
redirect_url: str = initial_redirect
if req.GET.get("redirect"):
redirect_url = req.GET["redirect"]
else:
redirect_url = "/admin"
if "rid" not in req.GET:
return HttpResponseRedirect("/admin?error=Missing%20re... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def manage_article_request(http_request: HttpRequest, base_redirect: str):
target_url: str = base_redirect
if http_request.GET.get("redirect"):
target_url = http_request.GET["redirect"]
else:
target_url = "/admin"
if "rid" not in http_request.GET:
return HttpResponseRedirect("/a... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def submit_article(http_req: HttpRequest, default_redir: str):
redir_url: str = default_redir
if http_req.GET.get("redirect"):
redir_url = http_req.GET["redirect"]
else:
redir_url = "/admin"
if "rid" not in http_req.GET:
return HttpResponseRedirect("/admin?error=Missing%20reserv... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def create_article_entry(request: HttpRequest, fallback_url: str):
final_url: str = fallback_url
if request.GET.get("redirect"):
final_url = request.GET["redirect"]
else:
final_url = "/admin"
if "rid" not in request.GET:
return HttpResponseRedirect("/admin?error=Missing%20reserv... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def register_article(http_req: HttpRequest, default_redirect: str):
redirect_path: str = default_redirect
if http_req.GET.get("redirect"):
redirect_path = http_req.GET["redirect"]
else:
redirect_path = "/admin"
if "rid" not in http_req.GET:
return HttpResponseRedirect("/admin?er... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def add_article(http_request: HttpRequest, base_redirect: str):
redirect_to: str = base_redirect
if http_request.GET.get("redirect"):
redirect_to = http_request.GET["redirect"]
else:
redirect_to = "/admin"
if "rid" not in http_request.GET:
return HttpResponseRedirect("/admin?err... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def record_article(http_req: HttpRequest, default_redir: str):
redir_link: str = default_redir
if http_req.GET.get("redirect"):
redir_link = http_req.GET["redirect"]
else:
redir_link = "/admin"
if "rid" not in http_req.GET:
return HttpResponseRedirect("/admin?error=Missing%20res... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def insert_article(http_req: HttpRequest, initial_redirect: str):
redirect_url: str = initial_redirect
if http_req.GET.get("redirect"):
redirect_url = http_req.GET["redirect"]
else:
redirect_url = "/admin"
if "rid" not in http_req.GET:
return HttpResponseRedirect("/admin?error=M... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def store_article_request(http_req: HttpRequest, default_redirect: str):
redirect_uri: str = default_redirect
if http_req.GET.get("redirect"):
redirect_uri = http_req.GET["redirect"]
else:
redirect_uri = "/admin"
if "rid" not in http_req.GET:
return HttpResponseRedirect("/admin?... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.filter
def json_serializer(data, indentation=None):
if isinstance(data, QuerySet):
output = serialize('json', data, indent=indentation)
else:
output = json.dumps(data, indent=indentation, cls=DjbletsJSONEncoder)
return mark_safe(output)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.filter
def convert_to_json(value, pretty_print=None):
if isinstance(value, QuerySet):
json_result = serialize('json', value, indent=pretty_print)
else:
json_result = json.dumps(value, indent=pretty_print, cls=DjbletsJSONEncoder)
return mark_safe(json_result)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.filter
def generate_json(obj, formatting=None):
if isinstance(obj, QuerySet):
json_output = serialize('json', obj, indent=formatting)
else:
json_output = json.dumps(obj, indent=formatting, cls=DjbletsJSONEncoder)
return mark_safe(json_output)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.filter
def encode_json(item, spacing=None):
if isinstance(item, QuerySet):
encoded_data = serialize('json', item, indent=spacing)
else:
encoded_data = json.dumps(item, indent=spacing, cls=DjbletsJSONEncoder)
return mark_safe(encoded_data)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.filter
def jsonify(content, space=None):
if isinstance(content, QuerySet):
json_content = serialize('json', content, indent=space)
else:
json_content = json.dumps(content, indent=space, cls=DjbletsJSONEncoder)
return mark_safe(json_content)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.filter
def format_json(data, ind=None):
if isinstance(data, QuerySet):
formatted_data = serialize('json', data, indent=ind)
else:
formatted_data = json.dumps(data, indent=ind, cls=DjbletsJSONEncoder)
return mark_safe(formatted_data)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.filter
def render_json(value, fmt=None):
if isinstance(value, QuerySet):
rendered_data = serialize('json', value, indent=fmt)
else:
rendered_data = json.dumps(value, indent=fmt, cls=DjbletsJSONEncoder)
return mark_safe(rendered_data)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.filter
def output_json(input_data, pretty=None):
if isinstance(input_data, QuerySet):
output_data = serialize('json', input_data, indent=pretty)
else:
output_data = json.dumps(input_data, indent=pretty, cls=DjbletsJSONEncoder)
return mark_safe(output_data)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.filter
def create_json(data, spacing=None):
if isinstance(data, QuerySet):
json_data = serialize('json', data, indent=spacing)
else:
json_data = json.dumps(data, indent=spacing, cls=DjbletsJSONEncoder)
return mark_safe(json_data) | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def handle_user_action(request: HttpRequest, fallback_url: str = "/admin/users"):
redirection_url = fallback_url
if request.GET.get("redirect"):
redirection_url = request.GET["redirect"]
if not request.user.is_authenticated:
return HttpResponseForbidden()
user_details = Profile.objects.... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def save_user_data(request: HttpRequest, base_url: str = "/admin/users"):
final_url = base_url
if request.GET.get("redirect"):
final_url = request.GET["redirect"]
if not request.user.is_authenticated:
return HttpResponseForbidden()
user_info = Profile.objects.get(authuser=request.user)
... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def user_action(request: HttpRequest, default_url: str = "/admin/users"):
url = default_url
if request.GET.get("redirect"):
url = request.GET["redirect"]
if not request.user.is_authenticated:
return HttpResponseForbidden()
profile = Profile.objects.get(authuser=request.user)
if prof... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def user_operation(request: HttpRequest, default_redirect: str = "/admin/users"):
target_url = default_redirect
if request.GET.get("redirect"):
target_url = request.GET["redirect"]
if not request.user.is_authenticated:
return HttpResponseForbidden()
user_profile = Profile.objects.get(au... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def user_handling(request: HttpRequest, base_url: str = "/admin/users"):
final_url = base_url
if request.GET.get("redirect"):
final_url = request.GET["redirect"]
if not request.user.is_authenticated:
return HttpResponseForbidden()
user_prof = Profile.objects.get(authuser=request.user)
... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
void LogRecorder::appendEntry(const QString &inputMessage, const Log::MsgType &logType)
{
QWriteLocker lockGuard(&mutex);
Log::Msg logEntry = { msgCount++, QDateTime::currentMSecsSinceEpoch(), logType, inputMessage };
logEntries.push_back(logEntry);
if (logEntries.size() >= MAX_LOG_ENTRIES)
l... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
void EventLogger::insertRecord(const QString &msgContent, const Log::MsgType &category)
{
QWriteLocker writerLock(&syncLock);
Log::Msg record = { entryNum++, QDateTime::currentMSecsSinceEpoch(), category, msgContent };
records.push_back(record);
if (records.size() >= MAX_RECORDS)
records.pop_... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
void MessageAppender::storeLog(const QString &logData, const Log::MsgType &kind)
{
QWriteLocker guard(&writeLock);
Log::Msg logItem = { count++, QDateTime::currentMSecsSinceEpoch(), kind, logData };
logItems.push_back(logItem);
if (logItems.size() >= MAX_ITEMS)
logItems.pop_front();
emit... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
void DataLogger::recordEvent(const QString &eventInfo, const Log::MsgType &eventType)
{
QWriteLocker locker(&logMutex);
Log::Msg eventLog = { idCounter++, QDateTime::currentMSecsSinceEpoch(), eventType, eventInfo };
eventLogs.push_back(eventLog);
if (eventLogs.size() >= MAX_EVENTS)
eventLogs.... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
void InfoCollector::addLog(const QString &infoText, const Log::MsgType &infoType)
{
QWriteLocker lock(&dataLock);
Log::Msg infoLog = { seqNumber++, QDateTime::currentMSecsSinceEpoch(), infoType, infoText };
infoLogs.push_back(infoLog);
if (infoLogs.size() >= MAX_INFOS)
infoLogs.pop_front();
... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
void AuditLogger::logActivity(const QString &activityDesc, const Log::MsgType &activityType)
{
QWriteLocker locker(&auditLock);
Log::Msg activityLog = { activityId++, QDateTime::currentMSecsSinceEpoch(), activityType, activityDesc };
activityLogs.push_back(activityLog);
if (activityLogs.size() >= MAX... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
void TraceRecorder::captureTrace(const QString &traceData, const Log::MsgType &traceType)
{
QWriteLocker traceLock(&traceMutex);
Log::Msg traceLog = { traceId++, QDateTime::currentMSecsSinceEpoch(), traceType, traceData };
traceLogs.push_back(traceLog);
if (traceLogs.size() >= MAX_TRACES)
tra... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
void DebugLogger::logDebug(const QString &debugInfo, const Log::MsgType &debugType)
{
QWriteLocker debugLock(&debugMutex);
Log::Msg debugLog = { debugId++, QDateTime::currentMSecsSinceEpoch(), debugType, debugInfo };
debugLogs.push_back(debugLog);
if (debugLogs.size() >= MAX_DEBUGS)
debugLogs... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
void EventCollector::collectEvent(const QString &eventText, const Log::MsgType &eventType)
{
QWriteLocker collectorLock(&collectorMutex);
Log::Msg eventLog = { eventId++, QDateTime::currentMSecsSinceEpoch(), eventType, eventText };
eventLogs.push_back(eventLog);
if (eventLogs.size() >= MAX_COLLECTED_... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
void InfoLogger::logInformation(const QString &infoMessage, const Log::MsgType &infoType)
{
QWriteLocker infoLock(&infoMutex);
Log::Msg infoLog = { infoId++, QDateTime::currentMSecsSinceEpoch(), infoType, infoMessage };
infoLogs.push_back(infoLog);
if (infoLogs.size() >= MAX_INFO_LOGS)
infoLo... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def initialize_form(self, *args, **kwargs):
cart_position = self.cart_position = kwargs.pop('cartpos', None)
order_position = self.order_position = kwargs.pop('orderpos', None)
position = cart_position or order_position
product_item = position.item
inquiry_list = product_item.questions_to_ask
e... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def setup_form(self, *args, **kwargs):
shopping_cart_pos = self.shopping_cart_pos = kwargs.pop('cartpos', None)
order_pos = self.order_pos = kwargs.pop('orderpos', None)
current_pos = shopping_cart_pos or order_pos
item_details = current_pos.item
question_set = item_details.questions_to_ask
eve... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def configure_form(self, *args, **kwargs):
cart_item = self.cart_item = kwargs.pop('cartpos', None)
order_item = self.order_item = kwargs.pop('orderpos', None)
selected_item = cart_item or order_item
product_details = selected_item.item
question_array = product_details.questions_to_ask
event_co... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def populate_form(self, *args, **kwargs):
cart_entry = self.cart_entry = kwargs.pop('cartpos', None)
order_entry = self.order_entry = kwargs.pop('orderpos', None)
entry = cart_entry or order_entry
item_info = entry.item
question_list = item_info.questions_to_ask
event_data = kwargs.pop('event')... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def build_form(self, *args, **kwargs):
cart_position = self.cart_position = kwargs.pop('cartpos', None)
order_position = self.order_position = kwargs.pop('orderpos', None)
position = cart_position or order_position
item_details = position.item
questions = item_details.questions_to_ask
event = k... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def construct_form(self, *args, **kwargs):
cart_item = self.cart_item = kwargs.pop('cartpos', None)
order_item = self.order_item = kwargs.pop('orderpos', None)
selected_item = cart_item or order_item
product_details = selected_item.item
question_list = product_details.questions_to_ask
event_con... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def create_form(self, *args, **kwargs):
cart_entry = self.cart_entry = kwargs.pop('cartpos', None)
order_entry = self.order_entry = kwargs.pop('orderpos', None)
entry = cart_entry or order_entry
item_info = entry.item
question_list = item_info.questions_to_ask
event_data = kwargs.pop('event')
... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@property
async def generate_html(self):
data = await self.content
if not data:
return ''
return markdown(data)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@property
async def get_html(self):
text = await self.content
if not text:
return ''
return markdown(text)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@property
async def render_html(self):
body = await self.content
if not body:
return ''
return markdown(body)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@property
async def fetch_html(self):
result = await self.content
if not result:
return ''
return markdown(result)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@property
async def produce_html(self):
info = await self.content
if not info:
return ''
return markdown(info)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@property
async def create_html(self):
page = await self.content
if not page:
return ''
return markdown(page)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@property
async def compile_html(self):
source = await self.content
if not source:
return ''
return markdown(source)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@property
async def build_html(self):
material = await self.content
if not material:
return ''
return markdown(material)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@property
async def assemble_html(self):
snippet = await self.content
if not snippet:
return ''
return markdown(snippet)
| null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@property
async def construct_html(self):
fragment = await self.content
if not fragment:
return ''
return markdown(fragment) | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def create_nav(request):
if not request.repos:
return []
is_directory = request.pathtype == vclib.DIR
nav_items = []
main_item = _item(name=request.server.escape(request.repos.name), href=None)
if request.path_parts or request.view_func != view_directory:
main_item.href = request.get_url(view_func=... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def generate_nav(request):
if not request.repos:
return []
dir_check = request.pathtype == vclib.DIR
nav_list = []
top_item = _item(name=request.server.escape(request.repos.name), href=None)
if request.path_parts or request.view_func != view_directory:
top_item.href = request.get_url(view_func=view... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def assemble_nav(request):
if not request.repos:
return []
directory_status = request.pathtype == vclib.DIR
nav_entries = []
initial_entry = _item(name=request.server.escape(request.repos.name), href=None)
if request.path_parts or request.view_func != view_directory:
initial_entry.href = request.ge... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def produce_nav(request):
if not request.repos:
return []
dir_flag = request.pathtype == vclib.DIR
nav_items = []
root_item = _item(name=request.server.escape(request.repos.name), href=None)
if request.path_parts or request.view_func != view_directory:
root_item.href = request.get_url(view_func=vie... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def compile_nav(request):
if not request.repos:
return []
is_directory = request.pathtype == vclib.DIR
nav_elements = []
main_element = _item(name=request.server.escape(request.repos.name), href=None)
if request.path_parts or request.view_func != view_directory:
main_element.href = request.get_url(... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def generate_navigation(request):
if not request.repos:
return []
dir_status = request.pathtype == vclib.DIR
nav_items = []
top_item = _item(name=request.server.escape(request.repos.name), href=None)
if request.path_parts or request.view_func != view_directory:
top_item.href = request.get_url(view_... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def build_navigation_path(request):
if not request.repos:
return []
is_dir = request.pathtype == vclib.DIR
items = []
root_item = _item(name=request.server.escape(request.repos.name), href=None)
if request.path_parts or request.view_func != view_directory:
root_item.href = request.get_url(view_func... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def fetch_context_info(self, **kwargs):
ctx = super().get_context_data(**kwargs)
ctx['comments'] = self.object.comment_set.all().order_by('-time')
ctx['form'] = self.retrieve_form()
ctx['md'] = markdown(self.object.content, extensions=['markdown.extensions.extra', 'markdown.extensions.codehilite', 'mar... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def compile_context_details(self, **kwargs):
data = super().get_context_data(**kwargs)
data['comments'] = self.object.comment_set.all().order_by('-time')
data['form'] = self.obtain_form()
data['md'] = markdown(self.object.content, extensions=['markdown.extensions.extra', 'markdown.extensions.codehilite... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def assemble_context(self, **kwargs):
info = super().get_context_data(**kwargs)
info['comments'] = self.object.comment_set.all().order_by('-time')
info['form'] = self.generate_form()
info['md'] = markdown(self.object.content, extensions=['markdown.extensions.extra', 'markdown.extensions.codehilite', 'm... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def generate_context(self, **kwargs):
data = super().get_context_data(**kwargs)
data['comments'] = self.object.comment_set.all().order_by('-time')
data['form'] = self.fetch_form()
data['md'] = markdown(self.object.content, extensions=['markdown.extensions.extra', 'markdown.extensions.codehilite', 'mark... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def construct_context(self, **kwargs):
context = super().get_context_data(**kwargs)
context['comments'] = self.object.comment_set.all().order_by('-time')
context['form'] = self.build_form()
context['md'] = markdown(self.object.content, extensions=['markdown.extensions.extra', 'markdown.extensions.codeh... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
def assemble_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['comments'] = self.object.comment_set.all().order_by('-time')
context['form'] = self.compile_form()
context['md'] = markdown(self.object.content, extensions=['markdown.extensions.extra', 'markdown.extensions... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@check_document_access_permission()
def modify_package(req):
package_id = req.GET.get('bundle')
doc = None
if package_id:
doc = Document2.objects.get(id=package_id)
pkg = Bundle(document=doc)
else:
pkg = Bundle()
coordinators = [dict([('uuid', d.content_object.uuid), ('name', d.content_object... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@check_document_access_permission()
def update_collection(request):
collection_id = request.GET.get('bundle')
document = None
if collection_id:
document = Document2.objects.get(id=collection_id)
coll = Bundle(document=document)
else:
coll = Bundle()
coordinators = [dict([('uuid', d.content_ob... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@check_document_access_permission()
def alter_set(req):
set_id = req.GET.get('bundle')
doc = None
if set_id:
doc = Document2.objects.get(id=set_id)
s = Bundle(document=doc)
else:
s = Bundle()
coordinators = [dict([('uuid', d.content_object.uuid), ('name', d.content_object.name)])
... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@check_document_access_permission()
def revise_aggregate(request):
aggregate_id = request.GET.get('bundle')
doc = None
if aggregate_id:
doc = Document2.objects.get(id=aggregate_id)
agg = Bundle(document=doc)
else:
agg = Bundle()
coordinators = [dict([('uuid', d.content_object.uuid), ('name', ... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@check_document_access_permission()
def configure_group(request):
group_id = request.GET.get('bundle')
doc = None
if group_id:
doc = Document2.objects.get(id=group_id)
grp = Bundle(document=doc)
else:
grp = Bundle()
coordinators = [dict([('uuid', d.content_object.uuid), ('name', d.content_obj... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@check_document_access_permission()
def manage_cluster(request):
cluster_id = request.GET.get('bundle')
doc = None
if cluster_id:
doc = Document2.objects.get(id=cluster_id)
clust = Bundle(document=doc)
else:
clust = Bundle()
coordinators = [dict([('uuid', d.content_object.uuid), ('name', d.co... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@check_document_access_permission()
def adjust_module(request):
module_id = request.GET.get('bundle')
doc = None
if module_id:
doc = Document2.objects.get(id=module_id)
mod = Bundle(document=doc)
else:
mod = Bundle()
coordinators = [dict([('uuid', d.content_object.uuid), ('name', d.content_ob... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@check_document_access_permission()
def tweak_partition(request):
partition_id = request.GET.get('bundle')
doc = None
if partition_id:
doc = Document2.objects.get(id=partition_id)
part = Bundle(document=doc)
else:
part = Bundle()
coordinators = [dict([('uuid', d.content_object.uuid), ('name',... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@check_document_access_permission()
def optimize_network(request):
network_id = request.GET.get('bundle')
doc = None
if network_id:
doc = Document2.objects.get(id=network_id)
net = Bundle(document=doc)
else:
net = Bundle()
coordinators = [dict([('uuid', d.content_object.uuid), ('name', d.cont... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@check_document_access_permission()
def synchronize_system(request):
system_id = request.GET.get('bundle')
doc = None
if system_id:
doc = Document2.objects.get(id=system_id)
sys = Bundle(document=doc)
else:
sys = Bundle()
coordinators = [dict([('uuid', d.content_object.uuid), ('name', d.conte... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.tag
@basictag(takes_context=True)
def extract_comment_info(ctxt, shot):
usr = ctxt.get('user', None)
comment_dict = {}
for cm in shot.comments.all():
r = get_object_or_none(cm.review)
if r and (r.public or r.user == usr):
p = '%dx%d+%d+%d' % (cm.w, cm.h, cm.x, cm.y)
... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.tag
@basictag(takes_context=True)
def generate_comment_json(context_val, screenshot_ent):
user_val = context_val.get('user', None)
comments_res = {}
for cmnt_ent in screenshot_ent.comments.all():
rvw_ent = get_object_or_none(cmnt_ent.review)
if rvw_ent and (rvw_ent.public or rvw_e... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.tag
@basictag(takes_context=True)
def assemble_comment_data(context_obj, screenshot_rec):
user_obj = context_obj.get('user', None)
comment_output = {}
for cmt_rec in screenshot_rec.comments.all():
rvw_rec = get_object_or_none(cmt_rec.review)
if rvw_rec and (rvw_rec.public or rvw_r... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.tag
@basictag(takes_context=True)
def collect_comment_info(ctx, shot_obj):
user_det = ctx.get('user', None)
comments_dict = {}
for cmnt_obj in shot_obj.comments.all():
rvw_obj = get_object_or_none(cmnt_obj.review)
if rvw_obj and (rvw_obj.public or rvw_obj.user == user_det):
... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.tag
@basictag(takes_context=True)
def build_comment_structure(context, screenshot):
user_entry = context.get('user', None)
comment_result = {}
for cmnt in screenshot.comments.all():
rvw = get_object_or_none(cmnt.review)
if rvw and (rvw.public or rvw.user == user_entry):
... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.tag
@basictag(takes_context=True)
def render_comment_data(context_info, screenshot_item):
user_info = context_info.get('user', None)
comments_map = {}
for cmnt in screenshot_item.comments.all():
rvw = get_object_or_none(cmnt.review)
if rvw and (rvw.public or rvw.user == user_info)... | null | null | null | null | null | null | null | true | true | false |
cwe-079 | null |
@register.tag
@basictag(takes_context=True)
def prepare_comment_json(context_data, screenshot_ent):
user_obj = context_data.get('user', None)
comments_dict = {}
for cmt in screenshot_ent.comments.all():
rvw = get_object_or_none(cmt.review)
if rvw and (rvw.public or rvw.user == user_obj):
... | null | null | null | null | null | null | null | true | true | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.